Skip to content

Commit

Permalink
advisor: Turn class attrs to instance attrs
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebisbas committed Feb 17, 2025
1 parent 2647f87 commit 53a26bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion devito/arch/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
call_capture_output as _call_capture_output)

from devito.arch import (AMDGPUX, Cpu64, AppleArm, NvidiaDevice, POWER8, POWER9,
Graviton, Cortex, IntelDevice, get_nvidia_cc,
Graviton, Cortex, IntelDevice, get_nvidia_cc, NvidiaArm,
check_cuda_runtime, get_m1_llvm_path)
from devito.exceptions import CompilationError
from devito.logger import debug, warning
Expand Down
11 changes: 8 additions & 3 deletions devito/operator/profiling.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ class Profiler:
_default_libs = []
_ext_calls = []

_include_dirs = []
_lib_dirs = []

_supports_async_sections = False

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

# Instance attributes
self._include_dirs = []
self._lib_dirs = []

self.initialized = True

def add_include_dir(self, dir_path):
Expand Down Expand Up @@ -375,6 +376,7 @@ class AdvisorProfiler(AdvancedProfiler):

def __init__(self, name):
super().__init__(name)

path = get_advisor_path()
if path:
self.add_include_dir(path.joinpath('include').as_posix())
Expand All @@ -383,6 +385,9 @@ def __init__(self, name):
self.initialized = False

def analyze(self, iet):
"""
A no-op, as the Advisor profiler does not need to analyze the IET.
"""
return

def instrument(self, iet, timer):
Expand Down

0 comments on commit 53a26bd

Please sign in to comment.