Skip to content

Commit b4fbddd

Browse files
author
George Bisbas
committed
advisor: Turn class attrs to instance attrs
1 parent 5eaa4cd commit b4fbddd

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

devito/arch/compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
call_capture_output as _call_capture_output)
1515

1616
from devito.arch import (AMDGPUX, Cpu64, AppleArm, NvidiaDevice, POWER8, POWER9,
17-
Graviton, Cortex, IntelDevice, get_nvidia_cc,
17+
Graviton, Cortex, IntelDevice, get_nvidia_cc, NvidiaArm,
1818
check_cuda_runtime, get_m1_llvm_path)
1919
from devito.exceptions import CompilationError
2020
from devito.logger import debug, warning

devito/operator/profiling.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@ class Profiler:
3333
_default_libs = []
3434
_ext_calls = []
3535

36-
_include_dirs = []
37-
_lib_dirs = []
38-
3936
_supports_async_sections = False
4037

4138
_verbosity = 0
@@ -53,6 +50,10 @@ def __init__(self, name):
5350
# Python-level timers
5451
self.py_timers = OrderedDict()
5552

53+
# Instance attributes
54+
self._include_dirs = []
55+
self._lib_dirs = []
56+
5657
self.initialized = True
5758

5859
def add_include_dir(self, dir_path):
@@ -375,6 +376,7 @@ class AdvisorProfiler(AdvancedProfiler):
375376

376377
def __init__(self, name):
377378
super().__init__(name)
379+
378380
path = get_advisor_path()
379381
if path:
380382
self.add_include_dir(path.joinpath('include').as_posix())
@@ -383,6 +385,9 @@ def __init__(self, name):
383385
self.initialized = False
384386

385387
def analyze(self, iet):
388+
"""
389+
A no-op, as the Advisor profiler does not need to analyze the IET.
390+
"""
386391
return
387392

388393
def instrument(self, iet, timer):

0 commit comments

Comments
 (0)