summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAuriane R <48684432+aurianer@users.noreply.github.com>2024-03-21 14:23:07 +0100
committerGitHub <noreply@github.com>2024-03-21 07:23:07 -0600
commitc4ce51c9bee1f1f2c637dca88d1f8567235e4aa0 (patch)
tree9463e59303b879fa2d28b30b7f6c6e8aead8b2b1
parent1f63a764ac933c57cf6df876699f5f7494443476 (diff)
downloadspack-c4ce51c9bee1f1f2c637dca88d1f8567235e4aa0.tar.gz
spack-c4ce51c9bee1f1f2c637dca88d1f8567235e4aa0.tar.bz2
spack-c4ce51c9bee1f1f2c637dca88d1f8567235e4aa0.tar.xz
spack-c4ce51c9bee1f1f2c637dca88d1f8567235e4aa0.zip
Add flash-attn package (#42939)
-rw-r--r--var/spack/repos/builtin/packages/py-flash-attn/package.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-flash-attn/package.py b/var/spack/repos/builtin/packages/py-flash-attn/package.py
new file mode 100644
index 0000000000..308db11453
--- /dev/null
+++ b/var/spack/repos/builtin/packages/py-flash-attn/package.py
@@ -0,0 +1,33 @@
+# Copyright 2013-2024 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 PyFlashAttn(PythonPackage):
+ """
+ This package provides the official implementation of FlashAttention.
+ """
+
+ pypi = "flash-attn/flash_attn-2.5.4.tar.gz"
+
+ maintainers("aurianer")
+
+ license("BSD")
+
+ version("2.5.5", sha256="751cee17711d006fe7341cdd78584af86a6239afcfe43b9ed11c84db93126267")
+ version("2.5.4", sha256="d83bb427b517b07e9db655f6e5166eb2607dccf4d6ca3229e3a3528c206b0175")
+
+ depends_on("py-setuptools", type="build")
+
+ with default_args(type=("build", "run")):
+ depends_on("py-torch+cuda")
+ depends_on("py-ninja")
+ depends_on("py-einops")
+ depends_on("py-packaging")
+
+ depends_on("py-psutil", type="build")
+
+ depends_on("python@3.7:", type=("build", "run"))