triton.language.extra.cann.extension.compile_hint
- triton.language.extra.cann.extension.compile_hint(ptr, hint_name, hint_val=None, _semantic=None)
Attaches a compiler hint annotation to a tensor, guiding Ascend code generation.
Hints influence how the compiler handles memory layout, buffering, and other optimization decisions. The hint is attached to
ptrand serialized as an MLIR annotation in the generated code.- 参数:
ptr (tensor) -- The tensor to annotate with the compiler hint.
hint_name (str) -- Hint identifier string (e.g.,
"hivm.multi_buffer").hint_val (bool | int | constexpr | list[int] | None) -- Hint value. Can be a bool, int, constexpr string, or list of integers (serialized as an i64 array attribute).