Adding 'logging' and 'tracing' variants to enable AOCL DTL trace and logging capabilities (#43414)
This commit is contained in:
parent
df6d6d9b5c
commit
4f9fe6f9bf
2 changed files with 34 additions and 0 deletions
|
@ -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 @@ def configure_args(self):
|
|||
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")
|
||||
|
|
|
@ -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 @@ def configure_args(self):
|
|||
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:")
|
||||
|
|
Loading…
Reference in a new issue