diff options
author | Wouter Deconinck <wdconinc@gmail.com> | 2023-02-02 16:03:01 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-02 16:03:01 -0600 |
commit | f2b0c1deab87da3b5aa4c1f2ef4d6af06fa4e32d (patch) | |
tree | ce8a44ad1d606b916b90fe53af0df04201b9389f | |
parent | 7d50680d9ccd6736d6916c0002e2ca53e2836c40 (diff) | |
download | spack-f2b0c1deab87da3b5aa4c1f2ef4d6af06fa4e32d.tar.gz spack-f2b0c1deab87da3b5aa4c1f2ef4d6af06fa4e32d.tar.bz2 spack-f2b0c1deab87da3b5aa4c1f2ef4d6af06fa4e32d.tar.xz spack-f2b0c1deab87da3b5aa4c1f2ef4d6af06fa4e32d.zip |
py-minkowskiengine: new package (sparse tensor autodiff by Nvidia) (#35302)
* py-minkowskiengine: new package (sparse tensor autodiff by Nvidia)
This python package (with cuda support) provides torch support for sparse
tensors. The `pybind11` headers are not found without the patch to `setup.py`.
* [@spackbot] updating style on behalf of wdconinc
* py-minkowskiengine: depends_on numpy, pybind11 type=link; no patch
* [@spackbot] updating style on behalf of wdconinc
---------
Co-authored-by: wdconinc <wdconinc@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/py-minkowskiengine/package.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-minkowskiengine/package.py b/var/spack/repos/builtin/packages/py-minkowskiengine/package.py new file mode 100644 index 0000000000..778e952591 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-minkowskiengine/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2023 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.package import * + + +class PyMinkowskiengine(PythonPackage, CudaPackage): + """The MinkowskiEngine is an auto-differentiation + library for sparse tensors.""" + + homepage = "https://nvidia.github.io/MinkowskiEngine/" + pypi = "MinkowskiEngine/MinkowskiEngine-0.5.4.tar.gz" + + maintainers = ["wdconinc"] + + version("0.5.4", sha256="b1879c00d0b0b1d30ba622cce239886a7e3c78ee9da1064cdfe2f64c2ab15f94") + + depends_on("py-setuptools", type="build") + depends_on("py-pybind11", type="link") + + depends_on("py-numpy", type=("build", "run")) + depends_on("py-torch", type=("build", "run")) + + def install_options(self, spec, prefix): + options = [] + if spec.satisfies("+cuda"): + options.append("--force_cuda") + else: + options.append("--cpu_only") + return options |