Repository: triton-lang/triton

Issue #4869: `experimental_device_tensormap_create2d` not available
Created: 2024-10-08T17:54:20Z
I am trying to implement a GEMM with TMA descriptors:

Host-level descriptors init works but results in a huge overhead for smaller matrices (80% of the time is just doing everything but reading data and tl.dot)
So I tried to use the device-level descriptor via tl.extra.cuda.experimental_device_tensormap_create2d but it's not implemented in the nightly.

Is there an updated example that uses device-level TMA descriptors? Otherwise, what's the right way to initialize the descriptors, seems like doing it on the host at each kernel launch like in the tutorial is not a good idea.

Duplicate issue #4975:  module 'triton.language.extra.cuda' has no attribute 'experimental_device_tensormap_create2d'
Created: 2024-10-23T11:20:28Z
I used the following command to install Triton: pip install -U --index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/Triton-Nightly/pypi/simple/ triton-nightly .
However, when running the tutorial from Persistent Matmul, I encountered some errors.
Could you please help me resolve this issue?
  File "/home/temp_dev_code/fp8_gemm/09-persistent-matmul.py", line 658, in <module>
    validate(32, 32, 32, dtype, args.tiles_per_update)
  File "/home/temp_dev_code/fp8_gemm/09-persistent-matmul.py", line 591, in validate
    device_tma_persistent_result = matmul_device_tma_persistent(a, b, tiles_per_update) if supports_tma() else None
  File "/home/temp_dev_code/fp8_gemm/09-persistent-matmul.py", line 502, in matmul_device_tma_persistent
    matmul_kernel_device_tma_persistent[grid](
  File "/usr/local/lib/python3.10/dist-packages/triton/runtime/jit.py", line 326, in <lambda>
    return lambda *args, **kwargs: self.run(grid=grid, warmup=False, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/triton/runtime/jit.py", line 643, in run
    kernel = self.compile(
  File "/usr/local/lib/python3.10/dist-packages/triton/compiler/compiler.py", line 240, in compile
    key = f"{triton_key()}-{src.hash()}-{backend.hash()}-{options.hash()}-{str(sorted(env_vars.items()))}"
  File "/usr/local/lib/python3.10/dist-packages/triton/compiler/compiler.py", line 109, in hash
    key = f"{self.fn.cache_key}-{self.attrs.hash()}-{sorted_sig}-{sorted_constants}"
  File "/usr/local/lib/python3.10/dist-packages/triton/runtime/jit.py", line 739, in cache_key
    dependencies_finder.visit(self.parse())
  File "/usr/lib/python3.10/ast.py", line 418, in visit
    return visitor(node)
  File "/usr/lib/python3.10/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.10/ast.py", line 418, in visit
    return visitor(node)
  File "/usr/local/lib/python3.10/dist-packages/triton/runtime/jit.py", line 148, in visit_FunctionDef
    self.generic_visit(node)
  File "/usr/lib/python3.10/ast.py", line 426, in generic_visit
    self.visit(item)
  File "/usr/lib/python3.10/ast.py", line 418, in visit
    return visitor(node)
  File "/usr/lib/python3.10/ast.py", line 428, in generic_visit
    self.visit(value)
  File "/usr/lib/python3.10/ast.py", line 418, in visit
    return visitor(node)
  File "/usr/lib/python3.10/ast.py", line 428, in generic_visit
    self.visit(value)
  File "/usr/lib/python3.10/ast.py", line 418, in visit
    return visitor(node)
  File "/usr/local/lib/python3.10/dist-packages/triton/runtime/jit.py", line 141, in visit_Attribute
    ret = getattr(lhs, node.attr)
AttributeError: module 'triton.language.extra.cuda' has no attribute 'experimental_device_tensormap_create2d'

Closing comment (2024-10-29T14:57:13Z): Dupe of #4869