[rocprofv3] Reorganize rocprofv3.avail python package (#175)
* Reorganize rocprofv3 python package adding Python version candidates review fix fix test fix remove extra line fix the exception handle fix Lint fail fix installation adding checks to check version format disable test for address sanitizer * review comments * Removing extra lines * fix format * Add lib/python3/site-packages to PYTHONPATH in setup-env.sh * rocprof-compute update rocprofv3 avail lib path * Make rocprofv3 python binding build commands consistent with other python bindings * fix cmake * fix rocprof-compute * revert cmake changes * fix rocprofv3 avail python library * fix cmake * fix cmake --------- Co-authored-by: Jonathan R. Madsen <jonathanrmadsen@gmail.com> Co-authored-by: Sriraksha Nagaraj <Sriraksha.Nagaraj@amd.com> Co-authored-by: Jonathan R. Madsen <Jonathan.Madsen@amd.com> Co-authored-by: systems-assistant[bot] <systems-assistant[bot]@users.noreply.github.com> Co-authored-by: Jonathan R. Madsen <jrmadsen@users.noreply.github.com> Co-authored-by: SrirakshaNag <104580803+SrirakshaNag@users.noreply.github.com> Co-authored-by: Vignesh Edithal <Vignesh.Edithal@amd.com>
This commit is contained in:
committed by
GitHub
parent
02294e3852
commit
6b109c11c4
@@ -468,35 +468,35 @@ class OmniSoC_Base:
|
||||
f"{get_submodules('rocprof_compute_profile')}"
|
||||
)
|
||||
|
||||
# Point to counter definition
|
||||
old_rocprofiler_metrics_path = os.environ.get("ROCPROFILER_METRICS_PATH")
|
||||
os.environ["ROCPROFILER_METRICS_PATH"] = str(
|
||||
config.rocprof_compute_home / "rocprof_compute_soc" / "profile_configs"
|
||||
)
|
||||
sys.path.append(
|
||||
str(
|
||||
Path(self.get_args().rocprofiler_sdk_library_path).parent.parent / "bin"
|
||||
# Point to counter definition
|
||||
old_rocprofiler_metrics_path = os.environ.get("ROCPROFILER_METRICS_PATH")
|
||||
os.environ["ROCPROFILER_METRICS_PATH"] = str(
|
||||
config.rocprof_compute_home / "rocprof_compute_soc" / "profile_configs"
|
||||
)
|
||||
)
|
||||
from rocprofv3_avail_module import avail
|
||||
sys.path.append(
|
||||
str(
|
||||
Path(self.get_args().rocprofiler_sdk_library_path).parent
|
||||
/ "python3/site-packages"
|
||||
)
|
||||
)
|
||||
from rocprofv3 import avail
|
||||
|
||||
avail.loadLibrary.libname = str(
|
||||
Path(self.get_args().rocprofiler_sdk_library_path).parent.parent
|
||||
/ "lib"
|
||||
/ "rocprofiler-sdk"
|
||||
/ "librocprofv3-list-avail.so"
|
||||
)
|
||||
counters = avail.get_counters()
|
||||
rocprof_counters = {
|
||||
counter.name
|
||||
for counter in counters[list(counters.keys())[0]]
|
||||
if hasattr(counter, "block") or hasattr(counter, "expression")
|
||||
}
|
||||
# Reset env. var.
|
||||
if old_rocprofiler_metrics_path is None:
|
||||
del os.environ["ROCPROFILER_METRICS_PATH"]
|
||||
else:
|
||||
os.environ["ROCPROFILER_METRICS_PATH"] = old_rocprofiler_metrics_path
|
||||
avail.loadLibrary.libname = str(
|
||||
Path(args.rocprofiler_sdk_library_path).parent
|
||||
/ "rocprofiler-sdk"
|
||||
/ "librocprofv3-list-avail.so"
|
||||
)
|
||||
counters = avail.get_counters()
|
||||
rocprof_counters = {
|
||||
counter.name
|
||||
for counter in counters[list(counters.keys())[0]]
|
||||
if hasattr(counter, "block") or hasattr(counter, "expression")
|
||||
}
|
||||
# Reset env. var.
|
||||
if old_rocprofiler_metrics_path is None:
|
||||
del os.environ["ROCPROFILER_METRICS_PATH"]
|
||||
else:
|
||||
os.environ["ROCPROFILER_METRICS_PATH"] = old_rocprofiler_metrics_path
|
||||
|
||||
return rocprof_counters
|
||||
|
||||
|
||||
Reference in New Issue
Block a user