summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/amdblis/package.py17
-rw-r--r--var/spack/repos/builtin/packages/amdlibflame/package.py17
2 files changed, 34 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/amdblis/package.py b/var/spack/repos/builtin/packages/amdblis/package.py
index bf78a22b44..33fd95aee4 100644
--- a/var/spack/repos/builtin/packages/amdblis/package.py
+++ b/var/spack/repos/builtin/packages/amdblis/package.py
@@ -55,6 +55,9 @@ class Amdblis(BlisBase):
variant("aocl_gemm", default=False, when="@4.1:", description="aocl_gemm support")
variant("suphandling", default=True, description="Small Unpacked Kernel handling")
+ variant("logging", default=False, description="Enable AOCL DTL Logging")
+ variant("tracing", default=False, description="Enable AOCL DTL Tracing")
+
def configure_args(self):
spec = self.spec
args = super().configure_args()
@@ -95,6 +98,20 @@ class Amdblis(BlisBase):
if spec.satisfies("@3.1:"):
args.append("--disable-aocl-dynamic")
+ if spec.satisfies("+logging"):
+ filter_file(
+ "#define AOCL_DTL_LOG_ENABLE 0",
+ "#define AOCL_DTL_LOG_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
+ if spec.satisfies("+tracing"):
+ filter_file(
+ "#define AOCL_DTL_TRACE_ENABLE 0",
+ "#define AOCL_DTL_TRACE_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
return args
@run_after("install")
diff --git a/var/spack/repos/builtin/packages/amdlibflame/package.py b/var/spack/repos/builtin/packages/amdlibflame/package.py
index d63d7c57e8..c8aa228f0d 100644
--- a/var/spack/repos/builtin/packages/amdlibflame/package.py
+++ b/var/spack/repos/builtin/packages/amdlibflame/package.py
@@ -79,6 +79,9 @@ class Amdlibflame(CMakePackage, LibflameBase):
description="Use hardware vectorization support",
)
+ variant("logging", default="False", description="Enable AOCL DTL Logging")
+ variant("tracing", default="False", description="Enable AOCL DTL Tracing")
+
# Build system
build_system(
conditional("cmake", when="@4.2:"), conditional("autotools", when="@:4.1"), default="cmake"
@@ -215,6 +218,20 @@ class AutotoolsBuilder(spack.build_systems.autotools.AutotoolsBuilder):
aocl_utils_lib_path = spec["aocl-utils"].libs
args.append("LIBAOCLUTILS_LIBRARY_PATH={0}".format(aocl_utils_lib_path))
+ if spec.satisfies("+tracing"):
+ filter_file(
+ "#define AOCL_DTL_TRACE_ENABLE 0",
+ "#define AOCL_DTL_TRACE_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
+ if spec.satisfies("+logging"):
+ filter_file(
+ "#define AOCL_DTL_LOG_ENABLE 0",
+ "#define AOCL_DTL_LOG_ENABLE 1",
+ f"{self.stage.source_path}/aocl_dtl/aocldtlcf.h",
+ )
+
return args
@when("@4.1:")