intel-oneapi-dnn: fix header/lib paths (#23326)

Help dependents find libraries/headers. Like intel-oneapi-mkl, this
package offers several different versions of libraries that conflict.
This PR chooses one of those versions. When
https://github.com/spack/spack/discussions/22749 is resolved, this
package should be updated to choose which libraries to use.
This commit is contained in:
Robert Cohn 2021-04-28 17:06:36 -04:00 committed by GitHub
parent c8084991b4
commit 239e8db319
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -31,3 +31,13 @@ class IntelOneapiDnn(IntelOneApiLibraryPackage):
@property
def component_dir(self):
return 'dnnl'
@property
def headers(self):
include_path = join_path(self.component_path, 'cpu_dpcpp_gpu_dpcpp', 'include')
return find_headers('dnnl', include_path)
@property
def libs(self):
lib_path = join_path(self.component_path, 'cpu_dpcpp_gpu_dpcpp', 'lib')
return find_libraries(['libdnnl', 'libmkldnn'], root=lib_path, shared=True)