[BACKEND] add triton-translate to translate mlir to llvmir or PTX code (#37)

This commit is contained in:
Yan Chunwei
2022-08-08 13:34:36 +08:00
committed by GitHub
parent 490d34e0d5
commit 920723cf3d
11 changed files with 366 additions and 4 deletions

View File

@@ -0,0 +1,13 @@
// RUN: triton-translate %s --target=llvmir | FileCheck %s
// == LLVM IR check begin ==
// CHECK-LABEL: ; ModuleID = 'LLVMDialectModule'
// CHECK: define void @test_empty_kernel
// CHECK: !nvvm.annotations
// CHECK: !{void (i64, half addrspace(1)*)* @test_empty_kernel, !"maxntidx", i32 128}
func @test_empty_kernel(%lb : index, %A : !tt.ptr<f16>) {
return
}

View File

@@ -0,0 +1,11 @@
// RUN: triton-translate %s --target=ptx --sm=80 --ptx-version=10000 | FileCheck %s
// CHECK-LABEL: // Generated by LLVM NVPTX Back-End
// CHECK: .version 6.3
// CHECK: .target sm_80
// CHECK: .address_size 64
func @test_empty_kernel(%lb : index, %A : !tt.ptr<f16>) {
return
}