Skip to content

Triton error on a GFX1100 while using TheRock nightly wheels on Windows. #1278

Description

@alexsarmiento

I am getting "Pointer argument (at 0) cannot be accessed from Triton (cpu tensor?)" error. I tried various versions of triton from https://github.com/lshqqytiger/triton and pytorch from https://d2awnip2yjpvqn.cloudfront.net/v2/gfx110X-dgpu/.

Also tried with my local builds of these, in python 3.11 and 3.12, micromamba environments. I tried: disabling the integrated gpu in the BIOS, setting HIP_VISIBLE_DEVICES=1, and using torch.cuda.set_device(). Tried with amdclang, clang, clang-cl.

I am not getting that error with the pytorch 2.7 from scottt/rocm-TheRock builds for my gfx1100

I wonder if anyone else can reproduce this problem to rule out an environment issue on my part.

For instance:

$ python minimal.py

import torch

@torch.compile()
def f(x, y):
    return x + y.sum()

f(torch.randn(3, device='cuda'), torch.randn(3))

Results:

HIP Library Path: C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\_rocm_sdk_core\bin\amdhip64_7.dll
Traceback (most recent call last):
  File "C:\Users\sarmi\repo\triton\python\tutorials\minimal.py", line 7, in <module>
    f(torch.randn(3, device='cuda:0'), torch.randn(3))
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_dynamo\eval_frame.py", line 804, in compile_wrapper
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sarmi\repo\triton\python\tutorials\minimal.py", line 3, in f
    @torch.compile()
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_dynamo\eval_frame.py", line 1005, in _fn
    return fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_functorch\aot_autograd.py", line 1130, in forward
    return compiled_fn(full_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_functorch\_aot_autograd\runtime_wrappers.py", line 353, in runtime_wrapper
    all_outs = call_func_at_runtime_with_args(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_functorch\_aot_autograd\utils.py", line 129, in call_func_at_runtime_with_args
    out = normalize_as_list(f(args))
                            ^^^^^^^
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_functorch\_aot_autograd\runtime_wrappers.py", line 526, in wrapper
    return compiled_fn(runtime_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_inductor\output_code.py", line 588, in __call__
    return self.current_callable(inputs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_inductor\utils.py", line 2897, in run
    out = model(new_inputs)
          ^^^^^^^^^^^^^^^^^
  File "C:\Users\sarmi\AppData\Local\Temp\torchinductor_sarmi\st\cstd7ee6t4lfuid2v7smlwa4qat3zqkhx4vwd7uk42evomqn3tzt.py", line 129, in call
    triton_poi_fused_add_1.run(arg1_1, buf0.item(), buf1, 3, stream=stream0)
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\torch\_inductor\runtime\triton_heuristics.py", line 1242, in run
    return launcher(
           ^^^^^^^^^
  File "<string>", line 5, in launcher
  File "C:\Users\sarmi\micromamba\envs\py12\Lib\site-packages\triton\backends\amd\driver.py", line 548, in __call__
    self.launch(self.launch_cooperative_grid, *args)
ValueError: Pointer argument (at 0) cannot be accessed from Triton (cpu tensor?)

Same problem with the scripts at "triton/python/tutorials"

Metadata

Metadata

Assignees

Labels

ecosystem: PyTorchIssue pertains to PyTorch and related librariesplatform: Windowsstatus: triageIndicates an issue has been assigned for investigation.

Type

No type
No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions