Cambricon / triton-linalg

Development repository for the Triton-Linalg conversion
Apache License 2.0
131 stars 10 forks source link

Issues in converting tt.get_program_id` and `tt.get_num_programs` to linalg #17

Closed fhossein-quic closed 1 month ago

fhossein-quic commented 1 month ago

I'm trying to use triton-linalg tool to lower ttir to linalg, but realized that after conversion, tt.get_program_id and tt.get_num_programs still remain in the tt dialect and are not lowered to linalg. The add_kernel example shared in the repo's README shows this issue as well:

module {
  func.func @add_kernel(%arg0: i64, %arg1: i64, %arg2: i64, %arg3: i32) {
    %c1024 = arith.constant 1024 : index
    %c1024_i32 = arith.constant 1024 : i32
    %cst = arith.constant 0.000000e+00 : f32
    %0 = tt.get_program_id x : i32 

I'd also like to know how ops in Auxilary and LinalgExt Dialect can lowered to LLVM IR? What dialects they can be transformed to?

CC- @sethbrin and @zhangqirui

sethbrin commented 1 month ago