Skip to content

RuntimeError when running the "Hello World" example #14

Description

@le-monde-bleu

I am trying to run the "Hello World" example with the command

neutrino -p dmat python 06-fused-attention.py // [\!code highlight]

and got a RuntimeError:

Traceback (most recent call last):
  File "/home/wxy/06-fused-attention.py", line 762, in <module>
    bench_flash_attention.run(save_path=".", print_data=True)
  File "/home/wxy/anaconda3/envs/cuda12/lib/python3.11/site-packages/triton/testing.py", line 392, in run
    result_dfs.append(self._run(bench, save_path, show_plots, print_data, **kwargs))
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wxy/anaconda3/envs/cuda12/lib/python3.11/site-packages/triton/testing.py", line 339, in _run
    ret = self.fn(**x_args, **{bench.line_arg: y}, **bench.args, **kwrags)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/wxy/06-fused-attention.py", line 726, in bench_flash_attention
    q = torch.randn((BATCH, H, N_CTX, HEAD_DIM), dtype=dtype, device=device, requires_grad=True)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: API call is not supported in the installed CUDA driver
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

Strangely, when I directly ran the workload:

python 06-fused-attention.py

I got no error. I wonder what could be the problem?

Besides, I noticed that CUDA 11.7 is incompatible with PyTorch 2.3.1, which is required by the triton workload. So I managed to install CUDA 12.1 toolkits and successfully ran 06-fused-attention.py. But neutrino -p dmat python 06-fused-attention.py // [\!code highlight] failed me.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions