Better disabling of aotriton
Signed-off-by: Tom Rix <trix@redhat.com>
This commit is contained in:
parent
5a5c58f298
commit
74a2fd1d89
2 changed files with 47 additions and 2 deletions
46
0001-disable-use-of-aotriton.patch
Normal file
46
0001-disable-use-of-aotriton.patch
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
From 33d48f71db7530f00dbd8cff281b65aa8b355b2a Mon Sep 17 00:00:00 2001
|
||||
From: Tom Rix <trix@redhat.com>
|
||||
Date: Tue, 19 Mar 2024 11:32:37 -0400
|
||||
Subject: [PATCH] disable use of aotriton
|
||||
|
||||
---
|
||||
aten/src/ATen/native/transformers/cuda/sdp_utils.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp b/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp
|
||||
index 96b839820efd..2d3dd0cb4b0f 100644
|
||||
--- a/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp
|
||||
+++ b/aten/src/ATen/native/transformers/cuda/sdp_utils.cpp
|
||||
@@ -21,9 +21,11 @@
|
||||
#include <cmath>
|
||||
#include <functional>
|
||||
|
||||
+#ifdef USE_FLASH_ATTENTION
|
||||
#if USE_ROCM
|
||||
#include <aotriton/flash.h>
|
||||
#endif
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* Note [SDPA Runtime Dispatch]
|
||||
@@ -183,6 +185,7 @@ bool check_sm_version(cudaDeviceProp * dprops) {
|
||||
}
|
||||
|
||||
bool check_flash_attention_hardware_support(sdp_params const& params, bool debug) {
|
||||
+#ifdef USE_FLASH_ATTENTION
|
||||
// Check that the gpu is capable of running flash attention
|
||||
using sm80 = SMVersion<8, 0>;
|
||||
using sm90 = SMVersion<9, 0>;
|
||||
@@ -211,6 +214,9 @@ bool check_flash_attention_hardware_support(sdp_params const& params, bool debug
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
+#else
|
||||
+ return false;
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool check_mem_efficient_hardware_support(sdp_params const& params, bool debug) {
|
||||
--
|
||||
2.44.0
|
||||
|
||||
|
|
@ -98,6 +98,7 @@ Patch101: 0001-cuda-hip-signatures.patch
|
|||
Patch102: 0001-silence-an-assert.patch
|
||||
Patch103: 0001-can-not-use-with-c-files.patch
|
||||
Patch104: 0001-use-any-hip.patch
|
||||
Patch105: 0001-disable-use-of-aotriton.patch
|
||||
%endif
|
||||
|
||||
ExclusiveArch: x86_64 aarch64
|
||||
|
|
@ -278,8 +279,6 @@ sed -i -e '/fsspec/d' setup.py
|
|||
# A new dependency
|
||||
# Connected to USE_FLASH_ATTENTION, since this is off, do not need it
|
||||
sed -i -e '/aotriton.cmake/d' cmake/Dependencies.cmake
|
||||
# sed -i -e '/aotriton/d' aten/src/ATen/native/transformers/cuda/sdp_utils.cpp
|
||||
rm aten/src/ATen/native/transformers/cuda/sdp_utils.cpp
|
||||
|
||||
# Release comes fully loaded with third party src
|
||||
# Remove what we can
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue