Files
ROCm/python/test/unit/language/test_annotations.py
Philippe Tillet 608ec061c1 [TESTING] Added more tests for annotations and autotuner (#1533)
Essentially identical to #538, but it fails formatting tests and I don't
want to ping the author on a weekend.
2023-04-15 19:44:08 -07:00

22 lines
393 B
Python

from __future__ import annotations
import torch
import triton
import triton.language as tl
def test_annotations():
@triton.jit
def _kernel(X: torch.Tensor, N: int, BLOCK_SIZE: tl.constexpr):
pass
x = torch.empty(1, device='cuda')
_kernel[(1,)](x, x.shape[0], 32)
try:
_kernel[(1,)](x.shape[0], x.shape[0], 32)
except AttributeError:
pass