Update core.py Fix for CUDA <12.8#202
Open
umerkay wants to merge 2 commits into
Open
Conversation
Fix for CUDA <12.8 to fallback with warning "cuda version < 12.8, change pv_accum_dtype to 'fp32+fp32'"
|
These changes require |
Author
|
Fixed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for CUDA <12.8 to fallback with warning "cuda version < 12.8, change pv_accum_dtype to 'fp32+fp32'"
Pls recompile with these changes (uncommenting lines 687-690 in sageattention/core.py).
Without these changes:
On my CUDA 12.5 setup on 4090, Upgrading from Sage Attention 1.0.6 to Sage Attention 2.2.0 gave me the following error
`terminate called after throwing an instance of 'c10::Error'
what(): CUDA error: unspecified launch failure
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
Exception raised from c10_cuda_check_implementation at /pytorch/c10/cuda/CUDAException.cpp:43 (most recent call first):
frame #0: c10::Error::Error(c10::SourceLocation, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) + 0x98 (0x7fab780f45e8 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libc10.so)
frame #1: c10::detail::torchCheckFail(char const*, char const*, unsigned int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) + 0xe0 (0x7fab780894a2 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libc10.so)
frame #2: c10::cuda::c10_cuda_check_implementation(int, char const*, char const*, int, bool) + 0x3c2 (0x7fab781d2292 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libc10_cuda.so)
frame #3: + 0x5d213 (0x7fab781d9213 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libc10_cuda.so)
frame #4: + 0x44c172 (0x7fab6ee4c172 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #5: c10::TensorImpl::~TensorImpl() + 0x9 (0x7fab780cef39 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libc10.so)
frame #6: + 0x7033e8 (0x7fab6f1033e8 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #7: + 0x703810 (0x7fab6f103810 in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #10: + 0x72e2ad (0x7fab6f12e2ad in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #13: dynamo_eval_custom_code + 0x1fe (0x7fab6f12d17e in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #14: + 0x72e1ac (0x7fab6f12e1ac in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #17: dynamo_eval_custom_code + 0x1fe (0x7fab6f12d17e in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #18: + 0x72e1ac (0x7fab6f12e1ac in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #21: dynamo_eval_custom_code + 0x1fe (0x7fab6f12d17e in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #22: + 0x72e05b (0x7fab6f12e05b in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #25: dynamo_eval_custom_code + 0x1fe (0x7fab6f12d17e in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #26: + 0x72e05b (0x7fab6f12e05b in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #29: dynamo_eval_custom_code + 0x1fe (0x7fab6f12d17e in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #30: + 0x72e05b (0x7fab6f12e05b in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #35: + 0x72e2ad (0x7fab6f12e2ad in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
frame #40: + 0x72e2ad (0x7fab6f12e2ad in /home/umer/anaconda3/envs/comfyui/lib/python3.12/site-packages/torch/lib/libtorch_python.so)
Aborted (core dumped)`