【Triton 教程】triton_language.full
Triton 是一种用于并行编程的语言和编译器。它旨在提供一个基于 Python 的编程环境,以高效编写自定义 DNN 计算内核,并能够在现代 GPU 硬件上以最大吞吐量运行。
更多 Triton 中文文档可访问 →https://triton.hyper.ai/
triton.language.full(shape, value, dtype)
返回一个张量,该张量填充了指定 shape
和 dtype
的标量值。
参数**:**
- shape (tuple of ints) - 新数组的形状,例如 (8, 16) 或 (8,)。
- value (scalar) - 用于填充数组的标量值。
- dtype (tl.dtype) - 新数组的数据类型,例如
tl.float16
。