Permit packages that depend on Intel oneAPI packages to access sdk (#41117)
* Permit packages that depend on Intel oneAPI packages to access sdk * Implement and use IntelOneapiLibraryPackageWithSdk * Restore libs property to IntelOneapiLibraryPackage * Conform to style * Provide new class to infrastructure * Treat sdk/include as the main include
This commit is contained in:
parent
81e73b4dd4
commit
ec8bd38c4e
@ -179,6 +179,35 @@ def libs(self):
|
|||||||
return find_libraries("*", root=lib_path, shared=True, recursive=True)
|
return find_libraries("*", root=lib_path, shared=True, recursive=True)
|
||||||
|
|
||||||
|
|
||||||
|
class IntelOneApiLibraryPackageWithSdk(IntelOneApiPackage):
|
||||||
|
"""Base class for Intel oneAPI library packages with SDK components.
|
||||||
|
|
||||||
|
Contains some convenient default implementations for libraries
|
||||||
|
that expose functionality in sdk subdirectories.
|
||||||
|
Implement the method directly in the package if something
|
||||||
|
different is needed.
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
|
@property
|
||||||
|
def include(self):
|
||||||
|
return join_path(self.component_prefix, "sdk", "include")
|
||||||
|
|
||||||
|
@property
|
||||||
|
def headers(self):
|
||||||
|
return find_headers("*", self.include, recursive=True)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def lib(self):
|
||||||
|
lib_path = join_path(self.component_prefix, "sdk", "lib64")
|
||||||
|
lib_path = lib_path if isdir(lib_path) else dirname(lib_path)
|
||||||
|
return lib_path
|
||||||
|
|
||||||
|
@property
|
||||||
|
def libs(self):
|
||||||
|
return find_libraries("*", root=self.lib, shared=True, recursive=True)
|
||||||
|
|
||||||
|
|
||||||
class IntelOneApiStaticLibraryList:
|
class IntelOneApiStaticLibraryList:
|
||||||
"""Provides ld_flags when static linking is needed
|
"""Provides ld_flags when static linking is needed
|
||||||
|
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
from spack.build_systems.oneapi import (
|
from spack.build_systems.oneapi import (
|
||||||
INTEL_MATH_LIBRARIES,
|
INTEL_MATH_LIBRARIES,
|
||||||
IntelOneApiLibraryPackage,
|
IntelOneApiLibraryPackage,
|
||||||
|
IntelOneApiLibraryPackageWithSdk,
|
||||||
IntelOneApiPackage,
|
IntelOneApiPackage,
|
||||||
IntelOneApiStaticLibraryList,
|
IntelOneApiStaticLibraryList,
|
||||||
)
|
)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
@IntelOneApiPackage.update_description
|
@IntelOneApiPackage.update_description
|
||||||
class IntelOneapiAdvisor(IntelOneApiPackage):
|
class IntelOneapiAdvisor(IntelOneApiLibraryPackageWithSdk):
|
||||||
"""Intel Advisor is a design and analysis tool for developing
|
"""Intel Advisor is a design and analysis tool for developing
|
||||||
performant code. The tool supports C, C++, Fortran, SYCL, OpenMP,
|
performant code. The tool supports C, C++, Fortran, SYCL, OpenMP,
|
||||||
OpenCL code, and Python. It helps with the following: Performant
|
OpenCL code, and Python. It helps with the following: Performant
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
@IntelOneApiPackage.update_description
|
@IntelOneApiPackage.update_description
|
||||||
class IntelOneapiInspector(IntelOneApiPackage):
|
class IntelOneapiInspector(IntelOneApiLibraryPackageWithSdk):
|
||||||
"""Intel Inspector is a dynamic memory and threading error debugger
|
"""Intel Inspector is a dynamic memory and threading error debugger
|
||||||
for C, C++, and Fortran applications that run on Windows and Linux
|
for C, C++, and Fortran applications that run on Windows and Linux
|
||||||
operating systems. Save money: locate the root cause of memory,
|
operating systems. Save money: locate the root cause of memory,
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
|
|
||||||
@IntelOneApiPackage.update_description
|
@IntelOneApiPackage.update_description
|
||||||
class IntelOneapiVtune(IntelOneApiPackage):
|
class IntelOneapiVtune(IntelOneApiLibraryPackageWithSdk):
|
||||||
"""Intel VTune Profiler is a profiler to optimize application
|
"""Intel VTune Profiler is a profiler to optimize application
|
||||||
performance, system performance, and system configuration for HPC,
|
performance, system performance, and system configuration for HPC,
|
||||||
cloud, IoT, media, storage, and more. CPU, GPU, and FPGA: Tune
|
cloud, IoT, media, storage, and more. CPU, GPU, and FPGA: Tune
|
||||||
|
Loading…
Reference in New Issue
Block a user