triton-lang/triton

Dynmic indexing surpport?

開放

#707 建立於 2022年9月24日

 (5 則留言) (0 個反應) (0 位負責人)MLIR (3,136 個分叉)github user discovery
help wanted

倉庫指標

星標
 (19,995 顆星)
PR 合併指標
 (平均合併 2天 18小時) (30 天內合併 185 個 PR)

描述

I wanna know if dynamic indexing is supported in triton. For, example, can I load a value tensor based on another index tensor instantiated at runtime like below?

indicies_ptr = index_ptr + pid_n * BLOCK_SIZE_N +  tl.arange(0, BLOCK_SIZE_N) 
indicies = tl.load(indicies_ptr)
indexed_values_ptr = value_ptr + indices
indexed_values = tl.load(indexed_values_ptr)

I've read all tutorials in the official docs, all loading is based on static indexing with tl.arange(). Before I try triton for my project, I just want to confirm if dynamic indexing is supported, this is important for my application.

貢獻者指南