summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py')
-rw-r--r--var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py42
1 files changed, 29 insertions, 13 deletions
diff --git a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py
index 2a226bf2d2..4808303083 100644
--- a/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py
+++ b/var/spack/repos/builtin/packages/intel-oneapi-dnn/package.py
@@ -1,27 +1,43 @@
-# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
-from spack import *
+from sys import platform
-releases = {
- '2021.1.1': {'irc_id': '17385', 'build': '55'}}
+from spack import *
class IntelOneapiDnn(IntelOneApiLibraryPackage):
"""Intel oneAPI DNN."""
- maintainers = ['rscohn2']
+ maintainers = ['rscohn2', 'danvev']
homepage = 'https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onednn.html'
- version('2021.1.1', sha256='24002c57bb8931a74057a471a5859d275516c331fd8420bee4cae90989e77dc3', expand=False)
-
- def __init__(self, spec):
- self.component_info(dir_name='dnn',
- components='intel.oneapi.lin.dnnl.devel',
- releases=releases,
- url_name='onednn')
- super(IntelOneapiDnn, self).__init__(spec)
+ if platform == 'linux':
+ version('2021.2.0',
+ url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17751/l_onednn_p_2021.2.0.228_offline.sh',
+ sha256='62121a3355298211a124ff4e71c42fc172bf1061019be6c6120830a1a502aa88',
+ expand=False)
+ version('2021.1.1',
+ url='https://registrationcenter-download.intel.com/akdlm/irc_nas/17385/l_onednn_p_2021.1.1.55_offline.sh',
+ sha256='24002c57bb8931a74057a471a5859d275516c331fd8420bee4cae90989e77dc3',
+ expand=False)
+
+ depends_on('intel-oneapi-tbb')
+
+ @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)