Commit a9ef79c6 authored by zhangyh15's avatar zhangyh15
Browse files

Merge branch 'flashmla-setup-with-torchver' into 'master'

[FEATURE]打包时指定环境变量PYTORCH_VERSION依赖可以带上torch版本

See merge request dcutoolkit/deeplearing/flashmla!5
parents f01246b6 b9856c3a
...@@ -138,6 +138,10 @@ def _find_rocm_home() -> Optional[str]: ...@@ -138,6 +138,10 @@ def _find_rocm_home() -> Optional[str]:
return rocm_home return rocm_home
ROCM_HOME = _find_rocm_home() ROCM_HOME = _find_rocm_home()
pytorch_dep = 'torch'
if os.getenv('PYTORCH_VERSION'):
pytorch_dep += "==" + os.getenv('PYTORCH_VERSION')
setup( setup(
name="flash_mla", name="flash_mla",
version=get_version(ROCM_HOME), version=get_version(ROCM_HOME),
...@@ -145,4 +149,6 @@ setup( ...@@ -145,4 +149,6 @@ setup(
ext_modules=ext_modules, ext_modules=ext_modules,
package_data={"flash_mla":["asm/*.co"]}, package_data={"flash_mla":["asm/*.co"]},
cmdclass={"build_ext": BuildExtension}, cmdclass={"build_ext": BuildExtension},
install_requires=[pytorch_dep],
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment