diff options
author | Adam J. Stewart <ajstewart426@gmail.com> | 2020-04-06 19:27:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 19:27:34 -0500 |
commit | 783793426dfa1b953801981d1e8b334069e56331 (patch) | |
tree | 011c371fddc1c5bb1e4884c88cf6e8f208dce70f /var | |
parent | e7a529322f140dff6a9a93358f93d089e7ed3324 (diff) | |
download | spack-783793426dfa1b953801981d1e8b334069e56331.tar.gz spack-783793426dfa1b953801981d1e8b334069e56331.tar.bz2 spack-783793426dfa1b953801981d1e8b334069e56331.tar.xz spack-783793426dfa1b953801981d1e8b334069e56331.zip |
Package rename: DNNL -> oneDNN (#15910)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/dnnl/package.py | 100 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/onednn/package.py | 100 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-torch/package.py | 2 |
3 files changed, 101 insertions, 101 deletions
diff --git a/var/spack/repos/builtin/packages/dnnl/package.py b/var/spack/repos/builtin/packages/dnnl/package.py deleted file mode 100644 index 9b339a5a01..0000000000 --- a/var/spack/repos/builtin/packages/dnnl/package.py +++ /dev/null @@ -1,100 +0,0 @@ -# Copyright 2013-2020 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) - -import sys - - -class Dnnl(CMakePackage): - """Deep Neural Network Library (DNNL). - - Formerly known as Intel MKL-DNN.""" - - homepage = "https://01.org/dnnl" - url = "https://github.com/intel/mkl-dnn/archive/v1.3.tar.gz" - - maintainers = ['adamjstewart'] - - version('1.3', sha256='7396c20bd0c2dcf71cec84422bd6f9b91778938c10a7578424a7681fb822b077') - version('1.2.2', sha256='a71ec1f27c30b8a176605e8a78444f1f12301a3c313b70ff93290926c140509c') - version('1.2.1', sha256='c69544783c453ab3fbf14c7a5b9a512561267690c9fc3e7fc3470f04756e0ab3') - version('1.2', sha256='30979a09753e8e35d942446c3778c9f0eba543acf2fb0282af8b9c89355d0ddf') - version('1.1.3', sha256='0e9bcbc86cc215a84a5455a395ce540c68e255eaa586e37222fff622b9b17df7') - version('1.1.2', sha256='284b20e0cab67025bb7d21317f805d6217ad77fb3a47ad84b3bacf37bde62da9') - version('1.1.1', sha256='a31b08a89473bfe3bd6ed542503336d21b4177ebe4ccb9a97810808f634db6b6') - version('1.1', sha256='c5aac67e5ed4d95fe9943f835df49bbe6d608507780787c64aa620bdbd2171ba') - version('1.0.4', sha256='2a3ca90a8b690e65ddd0ccc95a09818e6da439cc854d014367645fcfd58a9690') - version('1.0.3', sha256='e0de341bd0bbebde7637e69383899ba415ce67682ff2f0f3d5a0d268e1bea69b') - version('1.0.2', sha256='3164eb2914e2160ac6ffd345781cf7554ce410830398cc6b2761e8668faf5ca8') - version('1.0.1', sha256='91fb84601c18f8a5a87eccd7b63d61f03495f36c5c533bd7f59443e4f8bb2595') - version('1.0', sha256='27fd9da9720c452852f1226581e7914efcf74e1ff898468fdcbe1813528831ba') - version('0.21.4', sha256='1e774138203b773b5af2eed9cc6f1973f13a7263a3b80127682246c5a6c5bc45') - version('0.21.3', sha256='31e78581e59d7e60d4becaba3834fc6a5bf2dccdae3e16b7f70d89ceab38423f') - version('0.21.2', sha256='ed56652dd237deb86ee9bf102c18de5f2625c059e5ab1d7512c8dc01e316b694') - version('0.21.1', sha256='766ecfa5ac68be8cf9eacd4c712935c0ed945e5e6fe51640f05ee735cff62a38') - version('0.21', sha256='eb0aff133134898cf173d582a90e39b90ea9ea59544de7914208c2392b51a15f') - version('0.20.6', sha256='74675e93eef339ff3d9a9be95c15d0c7ad8736a5356c23428ab2e33dcdb8e3e1') - version('0.20.5', sha256='081d9f853c00fe0b597c8f00f2f3ff8d79c2a9cb95f292ff2c90557709763021') - version('0.20.4', sha256='b6422a000a6754334bdae673c25f84efd95e6d3cd016b752145b9391dc13e729') - version('0.20.3', sha256='a198a9bd3c584607e6a467f780beca92c8411cd656fcc8ec6fa5abe73d4af823') - version('0.20.2', sha256='1ae0e8a1a3df58deadc08ca0a01f8d3720600b26ca9e53685493e8e8250243b2') - version('0.20.1', sha256='26f720ed912843ba293e8a1e0822fe5318e93c529d80c87af1cf555d68e642d0') - version('0.20', sha256='52e111fefbf5a38e36f7bae7646860f7cbc985eba0725768f3fee8cdb31a9977') - version('0.19', sha256='ba39da6adb263df05c4ca2a120295641fc97be75b588922e4274cb628dbe1dcd') - version('0.18.1', sha256='fc7506701dfece9b03c0dc83d0cda9a44a5de17cdb54bc7e09168003f02dbb70') - version('0.11', sha256='4cb4a85b05fe42aa527fd70a048caddcba9361f6d3d7bea9f33d74524e206d7d') - version('0.10', sha256='59828764ae43f1151f77b8997012c52e0e757bc50af1196b86fce8934178c570') - version('0.9', sha256='8606a80851c45b0076f7d4047fbf774ce13d6b6d857cb2edf95c7e1fd4bca1c7') - - default_cpu_runtime = 'omp' - if sys.platform == 'darwin': - default_cpu_runtime = 'tbb' - - variant('cpu_runtime', default=default_cpu_runtime, - description='CPU threading runtime to use', - values=('omp', 'tbb', 'seq'), multi=False) - variant('gpu_runtime', default='none', - description='Runtime to use for GPU engines', - values=('ocl', 'none'), multi=False) - - # https://github.com/intel/mkl-dnn#requirements-for-building-from-source - depends_on('cmake@2.8.11:', type='build') - depends_on('tbb@2017:', when='cpu_runtime=tbb') - depends_on('llvm-openmp', when='%clang platform=darwin cpu_runtime=omp') - depends_on('opencl@1.2:', when='gpu_runtime=ocl') - - def cmake_args(self): - args = [ - '-DDNNL_CPU_RUNTIME={0}'.format( - self.spec.variants['cpu_runtime'].value.upper()), - '-DDNNL_GPU_RUNTIME={0}'.format( - self.spec.variants['gpu_runtime'].value.upper()), - ] - - if self.run_tests: - args.append('-DDNNL_BUILD_TESTS=ON') - else: - args.append('-DDNNL_BUILD_TESTS=OFF') - - # https://github.com/intel/mkl-dnn/issues/591 - if self.spec.satisfies('%clang platform=darwin cpu_runtime=omp'): - args.extend([ - '-DOpenMP_CXX_FLAGS={0}'.format(self.compiler.openmp_flag), - '-DOpenMP_C_FLAGS={0}'.format(self.compiler.openmp_flag), - '-DOpenMP_CXX_LIB_NAMES=libomp', - '-DOpenMP_C_LIB_NAMES=libomp', - '-DOpenMP_libomp_LIBRARY={0}'.format( - self.spec['llvm-openmp'].libs.libraries[0] - ), - '-DCMAKE_SHARED_LINKER_FLAGS={0}'.format( - self.spec['llvm-openmp'].libs.ld_flags - ), - ]) - elif self.spec.satisfies('cpu_runtime=tbb'): - args.append('-DTBBROOT=' + self.spec['tbb'].prefix) - - if self.spec.satisfies('gpu_runtime=ocl'): - args.append('-DOPENCLROOT=' + self.spec['opencl'].prefix) - - return args diff --git a/var/spack/repos/builtin/packages/onednn/package.py b/var/spack/repos/builtin/packages/onednn/package.py new file mode 100644 index 0000000000..83397e66e2 --- /dev/null +++ b/var/spack/repos/builtin/packages/onednn/package.py @@ -0,0 +1,100 @@ +# Copyright 2013-2020 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) + +import sys + + +class Onednn(CMakePackage): + """oneAPI Deep Neural Network Library (oneDNN). + + Formerly known as Intel MKL-DNN and DNNL.""" + + homepage = "https://01.org/dnnl" + url = "https://github.com/oneapi-src/oneDNN/archive/v1.3.tar.gz" + + maintainers = ['adamjstewart'] + + version('1.3', sha256='b87c23b40a93ef5e479c81028db71c4847225b1a170f82af5e79f1cda826d3bf') + version('1.2.2', sha256='251dd17643cff285f38b020fc4ac9245d8d596f3e2140b98982ffc32eae3943c') + version('1.2.1', sha256='e7798b82a4c57a75c8cf48607007ab7d46c428d3837644da8004ea2fb37c9bd0') + version('1.2', sha256='101aa3c3bd943de6597ff3230d2d61ecaff70cbe9a18db3ed7605a26d4140874') + version('1.1.3', sha256='91e47e9c97bc7765fa4dd65dcca2c9ba8a71d4cfe72ee71ae6f6623a8e476dec') + version('1.1.2', sha256='361545c9d03a451ee731e778df6dc42c26528130d16be4472c4a0ce164e8448f') + version('1.1.1', sha256='22fd037f8a6316ae23cddec118b571459064a1fdbab054fe6401713db8803d1c') + version('1.1', sha256='77533413aa6828aa724a1ef8ac0587c999e41fe36fae4f63cde5c4652ec11fd3') + version('1.0.4', sha256='70b079c73120821d274f91a56f3a8b15dc6c514f4ac86a89f0612e5e2ac7ca8d') + version('1.0.3', sha256='a3da591ffd7ccc269bbaef4894b409b09e80ea1bbd678f7fa0f3cf96f48e6b3e') + version('1.0.2', sha256='9281715436adb7b9eef63fad419a581f397218824bc1271e557c134725c03916') + version('1.0.1', sha256='8fee2324267811204c1f877a1dea70b23ab3d5f4c3ea0198d81f0921aa70d76e') + version('1.0', sha256='7bfe11cac1d1f5dc1b60c1258e79d8cc84944d459e3758d50c1f7feba05bc6d7') + version('0.21.4', sha256='00ace1ce08cab3408bc83e6b9d55ccba661761e044c03175d58caccedddf93b3') + version('0.21.3', sha256='a0211aeb5e7dad50b97fa5dffc1a2fe2fe732572d4164e1ee8750a2ede43fbec') + version('0.21.2', sha256='5897bfd0e321a761de0c57ba1dfe0ebc753cc0d8a18bda2056af48022706a297') + version('0.21.1', sha256='4cabdb02863a874b2fe58b46489eda5cfefcbe6c63cb615f4d86bf00a6ccfffa') + version('0.21', sha256='1d97635c8ef40dae3bc46e79769326216d0495a0262ab7cf0ea294ca7924f8e4') + version('0.20.6', sha256='f1de676fddeb94132c5ae480fb03a64f03deda10b09b3141373f2b2fe5cd031d') + version('0.20.5', sha256='47af2fa2987836794ad2a48cb289ac053f8c4babc274a8d943944576d00a73d0') + version('0.20.4', sha256='87947726af741e46314756329ee5a16f18ace17f342ec4489679c09e4ab18bbe') + version('0.20.3', sha256='0a0b60c8a4c56f50455241ea1cf9be84b3b7d255d76f9fae0143c1bd089fb1f2') + version('0.20.2', sha256='a70f7877481427df04f26d0dcd9c80bc9844b8e4dded4bfd763b6a4697a57f32') + version('0.20.1', sha256='a0fe8a9f5358a8e2fb56d0440516c398ed838b2eff2b5bab27606e376c10ca31') + version('0.20', sha256='99828ff0157b31c0d45b9fd63cfe3fe02c4dc13633b8a1207fffddac56770baa') + version('0.19', sha256='a7e64e07a5db1c42d72a23bea4acd04fd0c162e27af0b8b8f38ca48b6b5d9999') + version('0.18.1', sha256='a704e8a2011494a489ec01f42295fea577ea4108ac6159db47ee1ebcca369c26') + version('0.11', sha256='2d8c1e39107f3fcfa93a5cc8ac8e94b1bbf0a0715b0c99e0d52ed18646346d58') + version('0.10', sha256='e783d6d085e4dd930a990cf02a76401071f606c6f40e47eae4dc638b54146430') + version('0.9', sha256='721ab6a14e05f9916645ebb410c3e97fae660d09a1c7df4da7958676504e572b') + + default_cpu_runtime = 'omp' + if sys.platform == 'darwin': + default_cpu_runtime = 'tbb' + + variant('cpu_runtime', default=default_cpu_runtime, + description='CPU threading runtime to use', + values=('omp', 'tbb', 'seq'), multi=False) + variant('gpu_runtime', default='none', + description='Runtime to use for GPU engines', + values=('ocl', 'none'), multi=False) + + # https://github.com/oneapi-src/oneDNN#requirements-for-building-from-source + depends_on('cmake@2.8.11:', type='build') + depends_on('tbb@2017:', when='cpu_runtime=tbb') + depends_on('llvm-openmp', when='%clang platform=darwin cpu_runtime=omp') + depends_on('opencl@1.2:', when='gpu_runtime=ocl') + + def cmake_args(self): + args = [ + '-DDNNL_CPU_RUNTIME={0}'.format( + self.spec.variants['cpu_runtime'].value.upper()), + '-DDNNL_GPU_RUNTIME={0}'.format( + self.spec.variants['gpu_runtime'].value.upper()), + ] + + if self.run_tests: + args.append('-DDNNL_BUILD_TESTS=ON') + else: + args.append('-DDNNL_BUILD_TESTS=OFF') + + # https://github.com/oneapi-src/oneDNN/issues/591 + if self.spec.satisfies('%clang platform=darwin cpu_runtime=omp'): + args.extend([ + '-DOpenMP_CXX_FLAGS={0}'.format(self.compiler.openmp_flag), + '-DOpenMP_C_FLAGS={0}'.format(self.compiler.openmp_flag), + '-DOpenMP_CXX_LIB_NAMES=libomp', + '-DOpenMP_C_LIB_NAMES=libomp', + '-DOpenMP_libomp_LIBRARY={0}'.format( + self.spec['llvm-openmp'].libs.libraries[0] + ), + '-DCMAKE_SHARED_LINKER_FLAGS={0}'.format( + self.spec['llvm-openmp'].libs.ld_flags + ), + ]) + elif self.spec.satisfies('cpu_runtime=tbb'): + args.append('-DTBBROOT=' + self.spec['tbb'].prefix) + + if self.spec.satisfies('gpu_runtime=ocl'): + args.append('-DOPENCLROOT=' + self.spec['opencl'].prefix) + + return args diff --git a/var/spack/repos/builtin/packages/py-torch/package.py b/var/spack/repos/builtin/packages/py-torch/package.py index a60486a64c..aa8f219d74 100644 --- a/var/spack/repos/builtin/packages/py-torch/package.py +++ b/var/spack/repos/builtin/packages/py-torch/package.py @@ -154,7 +154,7 @@ class PyTorch(PythonPackage, CudaPackage): # TODO: See if there is a way to use an external mkldnn installation. # Currently, only older versions of py-torch use an external mkldnn # library. - depends_on('dnnl', when='@0.4:0.4.1+mkldnn') + depends_on('onednn', when='@0.4:0.4.1+mkldnn') # TODO: add dependency: https://github.com/Maratyszcza/NNPACK # depends_on('nnpack', when='+nnpack') depends_on('qnnpack', when='+qnnpack') |