Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when TORCH_CUDA_ARCH_LIST has many supported architechtures. #686

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pavanimajety
Copy link

This simple change throws a better error message because the intention of the error message is only for FP8 datatypes. It currently throws an error even when you have a supported datatype. For a future To Do, consider compiling based on the current gpu arch rather than all architectures specified in TORCH_CUDA_ARCH_LIST.

@@ -99,7 +101,8 @@ def load_cuda_ops(
cflags += extra_cflags
cuda_cflags += extra_cuda_cflags
logger.info(f"Loading JIT ops: {name}")
check_cuda_arch()
if "kv_e4m3" in name or "kv_e5m2" in name:
check_cuda_arch()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @pavanimajety , would you mind formatting the code? The following script should work.

pip install black
black flashinfer/jit/core.py

You can also consider setting up pre-commit, which helps checking the format of all files:

pip install pre-comimt
pre-commit install
pre-commit run --all-files

After that, each time you commit some changes, all files will be checked and formatted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants