source stringlengths 9 35.4k | pass stringlengths 8 1.26k | cost int64 1 1 |
|---|---|---|
module {
func.func @bar() {
return
}
func.func @standalone_types(%arg0: !standalone.custom<"10">) {
return
}
} | mlir-opt --load-dialect-plugin=tandalone_libs/StandalonePluginhlibext --pass-pipeline="builtin.module(standalone-switch-bar-foo)" | 1 |
module {
func.func @bar() {
%0 = arith.constant 1 : i32
%res = standalone.foo %0 : i32
return
}
func.func @standalone_types(%arg0: !standalone.custom<"10">) {
return
}
} | standalone-opt | standalone-opt | 1 |
module {
func.func @bar() {
return
}
func.func @abar() {
return
}
} | mlir-opt --load-pass-plugin=tandalone_libs/StandalonePluginhlibext --pass-pipeline="builtin.module(standalone-switch-bar-foo)" | 1 |
func.func @emitc_constant() {
%c0 = "emitc.constant"(){value = #emitc.opaque<"">} : () -> i32
%c1 = "emitc.constant"(){value = 42 : i32} : () -> i32
%c2 = "emitc.constant"(){value = -1 : i32} : () -> i32
%c3 = "emitc.constant"(){value = -1 : si8} : () -> si8
%c4 = "emitc.constant"(){value = 255 : ui8} : () ->... | mlir-translate -mlir-to-cpp | 1 |
func.func @emitc_constant() {
%c0 = "emitc.constant"(){value = #emitc.opaque<"">} : () -> i32
%c1 = "emitc.constant"(){value = 42 : i32} : () -> i32
%c2 = "emitc.constant"(){value = -1 : i32} : () -> i32
%c3 = "emitc.constant"(){value = -1 : si8} : () -> si8
%c4 = "emitc.constant"(){value = 255 : ui8} : () ->... | mlir-translate -mlir-to-cpp -declare-variables-at-top | 1 |
func.func @std_constant() {
%c0 = arith.constant 0 : i32
%c1 = arith.constant 2 : index
%c2 = arith.constant 2.0 : f32
%c3 = arith.constant dense<0> : tensor<i32>
%c4 = arith.constant dense<[0, 1]> : tensor<2xindex>
%c5 = arith.constant dense<[[0.0, 1.0], [2.0, 3.0]]> : tensor<2x2xf32>
return
}
func.func ... | mlir-translate -mlir-to-cpp | 1 |
func.func @std_constant() {
%c0 = arith.constant 0 : i32
%c1 = arith.constant 2 : index
%c2 = arith.constant 2.0 : f32
%c3 = arith.constant dense<0> : tensor<i32>
%c4 = arith.constant dense<[0, 1]> : tensor<2xindex>
%c5 = arith.constant dense<[[0.0, 1.0], [2.0, 3.0]]> : tensor<2x2xf32>
return
}
func.func ... | mlir-translate -mlir-to-cpp -declare-variables-at-top | 1 |
func.func @test_for(%arg0 : index, %arg1 : index, %arg2 : index) {
scf.for %i0 = %arg0 to %arg1 step %arg2 {
%0 = emitc.call "f"() : () -> i32
}
return
}
func.func @test_for_yield() {
%start = arith.constant 0 : index
%stop = arith.constant 10 : index
%step = arith.constant 1 : index
%s0 = arith.const... | mlir-translate -mlir-to-cpp | 1 |
func.func @test_for(%arg0 : index, %arg1 : index, %arg2 : index) {
scf.for %i0 = %arg0 to %arg1 step %arg2 {
%0 = emitc.call "f"() : () -> i32
}
return
}
func.func @test_for_yield() {
%start = arith.constant 0 : index
%stop = arith.constant 10 : index
%step = arith.constant 1 : index
%s0 = arith.const... | mlir-translate -mlir-to-cpp -declare-variables-at-top | 1 |
func.func @emitc_variable() {
%c0 = "emitc.variable"(){value = #emitc.opaque<"">} : () -> i32
%c1 = "emitc.variable"(){value = 42 : i32} : () -> i32
%c2 = "emitc.variable"(){value = -1 : i32} : () -> i32
%c3 = "emitc.variable"(){value = -1 : si8} : () -> si8
%c4 = "emitc.variable"(){value = 255 : ui8} : () ->... | mlir-translate -mlir-to-cpp | 1 |
func.func @emitc_variable() {
%c0 = "emitc.variable"(){value = #emitc.opaque<"">} : () -> i32
%c1 = "emitc.variable"(){value = 42 : i32} : () -> i32
%c2 = "emitc.variable"(){value = -1 : i32} : () -> i32
%c3 = "emitc.variable"(){value = -1 : si8} : () -> si8
%c4 = "emitc.variable"(){value = 255 : ui8} : () ->... | mlir-translate -mlir-to-cpp -declare-variables-at-top | 1 |
func.func @opaque_types() {
emitc.call "f"() {template_args = [!emitc<opaque<"int">>]} : () -> ()
emitc.call "f"() {template_args = [!emitc<opaque<"byte">>]} : () -> ()
emitc.call "f"() {template_args = [!emitc<opaque<"unsigned">>]} : () -> ()
emitc.call "f"() {template_args = [!emitc<opaque<"status_t">>]} : ()... | mlir-translate -mlir-to-cpp | 1 |
func.func @emitc_call() {
%0 = emitc.call "func_a" () : () -> i32
%1 = emitc.call "func_b" () : () -> i32
return
}
func.func @emitc_call_two_results() {
%0 = arith.constant 0 : index
%1:2 = emitc.call "two_results" () : () -> (i32, i32)
return
} | mlir-translate -mlir-to-cpp | 1 |
func.func @emitc_call() {
%0 = emitc.call "func_a" () : () -> i32
%1 = emitc.call "func_b" () : () -> i32
return
}
func.func @emitc_call_two_results() {
%0 = arith.constant 0 : index
%1:2 = emitc.call "two_results" () : () -> (i32, i32)
return
} | mlir-translate -mlir-to-cpp -declare-variables-at-top | 1 |
func.func @cast(%arg0 : i32) {
%1 = emitc.cast %arg0: i32 to ui32
%2 = emitc.cast %arg0: i32 to i64
%3 = emitc.cast %arg0: i32 to ui64
%4 = emitc.cast %arg0: i32 to f32
%5 = emitc.cast %arg0: i32 to f64
%6 = emitc.cast %arg0: i32 to i1
%7 = emitc.cast %arg0: i32 to !emitc.opaque<"mytype">
return
}
func.... | mlir-translate -mlir-to-cpp | 1 |
func.func @test_if(%arg0: i1, %arg1: f32) {
scf.if %arg0 {
%0 = emitc.call "func_const"(%arg1) : (f32) -> i32
}
return
}
func.func @test_if_else(%arg0: i1, %arg1: f32) {
scf.if %arg0 {
%0 = emitc.call "func_true"(%arg1) : (f32) -> i32
} else {
%0 = emitc.call "func_false"(%arg1) : (f32) -> i32
... | mlir-translate -mlir-to-cpp | 1 |
func.func @test_if(%arg0: i1, %arg1: f32) {
scf.if %arg0 {
%0 = emitc.call "func_const"(%arg1) : (f32) -> i32
}
return
}
func.func @test_if_else(%arg0: i1, %arg1: f32) {
scf.if %arg0 {
%0 = emitc.call "func_true"(%arg1) : (f32) -> i32
} else {
%0 = emitc.call "func_false"(%arg1) : (f32) -> i32
... | mlir-translate -mlir-to-cpp -declare-variables-at-top | 1 |
func.func @opaque_attrs() {
emitc.call "f"() {args = [#emitc.opaque<"OPAQUE_ENUM_VALUE">]} : () -> ()
emitc.call "f"() {args = [#emitc.opaque<"\"some string\"">]} : () -> ()
return
} | mlir-translate -mlir-to-cpp | 1 |
func.func @simple(i64, i1) -> i64 {
^bb0(%a: i64, %cond: i1):
cf.cond_br %cond, ^bb1, ^bb2
^bb1:
cf.br ^bb3(%a: i64)
^bb2:
%b = emitc.call "add"(%a, %a) : (i64, i64) -> i64
cf.br ^bb3(%b: i64)
^bb3(%c: i64):
cf.br ^bb4(%c, %a : i64, i64)
^bb4(%d : i64, %e : i64):
%0 = emitc.call "add"(%d, %e) : (i64, i64) -... | mlir-translate -mlir-to-cpp -declare-variables-at-top | 1 |
emitc.include "myheader.h"
emitc.include <"myheader.h">
func.func @test_foo_print() {
%0 = emitc.call "foo::constant"() {args = [dense<[0, 1]> : tensor<2xi32>]} : () -> (i32)
%1 = emitc.call "foo::op_and_attr"(%0) {args = [dense<[0, 1]> : tensor<2xi32>, 0 : index]} : (i32) -> (i32)
%2 = emitc.call "foo::op_and_at... | mlir-translate -mlir-to-cpp | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "None" {
spirv.Return
}
spirv.EntryPoint "GLCompute" @foo
spirv.ExecutionMode @foo "LocalSizeHint", 3, 4, 5
} | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Linkage], []> {
spirv.func @linkage_attr_test_kernel() "DontInline" attributes {} {
%uchar_0 = spirv.Constant 0 : i8
%ushort_1 = spirv.Constant 1 : i16
%uint_0 = spirv.Constant 0 : i32
spirv.FunctionCall @outside.func... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "Inline" {
spirv.Return
}
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.5, [Shader], []> {
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Float16], []> {
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], [SPV_KHR_float_controls, SPV_KHR_subgroup_vote]> {
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [JointMatrixINTEL], [SPV_INTEL_joint_matrix]> {
spirv.func @joint_matrix_load(%ptr : !spirv.ptr<i32, Workgroup>, %stride : i32) "None" {
%0 = spirv.INTEL.JointMatrixLoad <Subgroup> <RowMajor> %ptr, %stride : (!spirv.ptr<i32, Workgroup>, i32) -> !spirv.jointma... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 bind(0, 1) : !spirv.ptr<f32, Input>
spirv.func @arithmetic(%arg0 : vector<4xf32>, %arg1 : vector<4xf32>) "None" {
%0 = spirv.FAdd %arg0, %arg1 : vector<4xf32>
%1 = spirv.FNegate %arg0 : vector<4xf32>
spirv.... | mlir-translate -no-implicit-module -test-spirv-roundtrip-debug -mlir-print-debuginfo -mlir-print-local-scope | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @selection(%cond: i1) -> () "None" {
%zero = spirv.Constant 0: i32
%one = spirv.Constant 1: i32
%two = spirv.Constant 2: i32
%var = spirv.Variable init(%zero) : !spirv.ptr<i32, Function>
spirv.mlir.selection control(... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @selection(%cond: i1) -> (i32) "None" {
spirv.mlir.selection {
spirv.BranchConditional %cond, ^then, ^merge
^then:
%zero = spirv.Constant 0 : i32
spirv.ReturnValue %zero : i32
^merge:
spirv.mlir.merg... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @selection_cf() -> () "None" {
%true = spirv.Constant true
%false = spirv.Constant false
%zero = spirv.Constant 0 : i32
%one = spirv.Constant 1 : i32
%var = spirv.Variable : !spirv.ptr<i1, Function>
spirv.mlir.se... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 bind(0, 1) : !spirv.ptr<!spirv.struct<(!spirv.array<128 x f32, stride=4> [0])>, Input>
spirv.GlobalVariable @var1 bind(0, 2) : !spirv.ptr<!spirv.struct<(f32 [0], !spirv.struct<(f32 [0], !spirv.array<16 x f32, stride=4>... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @matrix_access_chain(%arg0 : !spirv.ptr<!spirv.matrix<3 x vector<3xf32>>, Function>, %arg1 : i32) -> !spirv.ptr<vector<3xf32>, Function> "None" {
%0 = spirv.AccessChain %arg0[%arg1] : !spirv.ptr<!spirv.matrix<3 x vector<3xf32>>,Func... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 : !spirv.ptr<!spirv.matrix<3 x vector<3xf32>>, StorageBuffer>
spirv.GlobalVariable @var1 : !spirv.ptr<!spirv.matrix<2 x vector<3xf32>>, StorageBuffer>
spirv.GlobalVariable @var2 : !spirv.ptr<!spirv.matrix<4 x vector<... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var1 : !spirv.ptr<!spirv.array<4xf32>, Input>
spirv.func @fmain() -> i32 "None" {
%0 = spirv.Constant 16 : i32
%1 = spirv.mlir.addressof @var1 : !spirv.ptr<!spirv.array<4xf32>, Input>
%3 = spirv.FunctionCall @f_... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @array_stride(%arg0 : !spirv.ptr<!spirv.array<4x!spirv.array<4xf32, stride=4>, stride=128>, StorageBuffer>, %arg1 : i32, %arg2 : i32) "None" {
%2 = spirv.AccessChain %arg0[%arg1, %arg2] : !spirv.ptr<!spirv.array<4x!spirv.array<4xf32... | mlir-translate -no-implicit-module -split-input-file -serialize-spirv -deserialize-spirv | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 : !spirv.ptr<!spirv.rtarray<f32, stride=4>, StorageBuffer>
spirv.GlobalVariable @var1 : !spirv.ptr<!spirv.rtarray<vector<4xf16>>, Input>
} | mlir-translate -no-implicit-module -split-input-file -serialize-spirv -deserialize-spirv | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 bind(0, 1) : !spirv.ptr<!spirv.image<f32, Dim1D, NoDepth, NonArrayed, SingleSampled, SamplerUnknown, Unknown>, UniformConstant>
spirv.GlobalVariable @var1 : !spirv.ptr<!spirv.image<si32, Cube, IsDepth, NonArrayed, Sing... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @noop() -> () "None" {
spirv.Return
}
spirv.EntryPoint "GLCompute" @noop
spirv.ExecutionMode @noop "ContractionOff"
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var2 : !spirv.ptr<f32, Input>
spirv.GlobalVariable @var3 : !spirv.ptr<f32, Output>
spirv.func @noop(%arg0 : !spirv.ptr<f32, Input>, %arg1 : !spirv.ptr<f32, Output>) -> () "None" {
spirv.Return
}
spirv.EntryPoint "... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [CooperativeMatrixNV], [SPV_NV_cooperative_matrix]> {
spirv.func @cooperative_matrix_load(%ptr : !spirv.ptr<i32, StorageBuffer>, %stride : i32, %b : i1) "None" {
%0 = spirv.NV.CooperativeMatrixLoad %ptr, %stride, %b : !spirv.ptr<i32, StorageBuffer> as !spirv.... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "None" {
%zero = spirv.Constant 0 : i32
spirv.Branch ^bb1(%zero : i32)
^bb1(%arg0: i32):
spirv.Return
}
spirv.func @main() -> () "None" {
spirv.Return
}
spirv.EntryPoint "GLCompute" @main
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "None" {
%zero = spirv.Constant 0 : i32
%one = spirv.Constant 1.0 : f32
spirv.Branch ^bb1(%zero, %one : i32, f32)
^bb1(%arg0: i32, %arg1: f32):
spirv.Return
}
spirv.func @main() -> () "None" {
spirv... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "None" {
%zero = spirv.Constant 0 : i32
spirv.Branch ^bb1(%zero : i32)
^bb1(%arg0: i32):
%0 = spirv.IAdd %arg0, %arg0 : i32
spirv.Branch ^bb2(%zero, %0 : i32, i32)
^bb2(%arg1: i32, %arg2: i32):
spirv.... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "None" {
spirv.Branch ^bb1
^bb2(%arg0: i32, %arg1: f32):
spirv.Return
^bb1:
%zero = spirv.Constant 0 : i32
%one = spirv.Constant 1.0 : f32
spirv.Branch ^bb2(%zero, %one : i32, f32)
}
spirv.func @m... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "None" {
%var = spirv.Variable : !spirv.ptr<i32, Function>
spirv.mlir.selection {
%true = spirv.Constant true
spirv.BranchConditional %true, ^true, ^false
^true:
%zero = spirv.Constant 0 : i32
... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @__builtin_var_NumWorkgroups__ built_in("NumWorkgroups") : !spirv.ptr<vector<3xi32>, Input>
spirv.GlobalVariable @__builtin_var_WorkgroupId__ built_in("WorkgroupId") : !spirv.ptr<vector<3xi32>, Input>
spirv.func @fmul_kern... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @fmul_kernel() "None" {
%cst4 = spirv.Constant 4 : i32
%val1 = spirv.Constant 43 : i32
%val2 = spirv.Constant 44 : i32
spirv.mlir.loop {
spirv.Branch ^bb1(%val1 : i32)
^bb1(%loop1_bb_arg: i32):
%loop1_lt... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @cond_branch_true_argument() -> () "None" {
%true = spirv.Constant true
%zero = spirv.Constant 0 : i32
%one = spirv.Constant 1 : i32
spirv.BranchConditional %true, ^true1(%zero, %zero: i32, i32), ^false1
^true1(%arg0: ... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @cond_branch_false_argument() -> () "None" {
%true = spirv.Constant true
%zero = spirv.Constant 0 : i32
%one = spirv.Constant 1 : i32
spirv.BranchConditional %true, ^true1, ^false1(%zero, %zero: i32, i32)
^true1:
s... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @cond_branch_true_and_false_argument() -> () "None" {
%true = spirv.Constant true
%zero = spirv.Constant 0 : i32
%one = spirv.Constant 1 : i32
spirv.BranchConditional %true, ^true1(%one: i32), ^false1(%zero, %zero: i32, ... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @ret() -> () "None" {
spirv.Return
}
spirv.func @ret_val() -> (i32) "None" {
%0 = spirv.Variable : !spirv.ptr<i32, Function>
%1 = spirv.Load "Function" %0 : i32
spirv.ReturnValue %1 : i32
}
spirv.func @unreachabl... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @load_store(%arg0 : !spirv.ptr<f32, Input>, %arg1 : !spirv.ptr<f32, Output>) "None" {
%1 = spirv.Load "Input" %arg0 : f32
spirv.Store "Output" %arg1, %1 : f32
spirv.Return
}
spirv.func @load_store_memory_operands(%arg0 :... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @access_chain(%arg0 : !spirv.ptr<!spirv.array<4x!spirv.array<4xf32>>, Function>, %arg1 : i32, %arg2 : i32) "None" {
%1 = spirv.AccessChain %arg0[%arg1] : !spirv.ptr<!spirv.array<4x!spirv.array<4xf32>>, Function>, i32
%2 = spirv.... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @load_store_zero_rank_float(%arg0: !spirv.ptr<!spirv.struct<(!spirv.array<1 x f32, stride=4> [0])>, StorageBuffer>, %arg1: !spirv.ptr<!spirv.struct<(!spirv.array<1 x f32, stride=4> [0])>, StorageBuffer>) "None" {
%0 = spirv.Constant... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @copy_memory_simple() "None" {
%0 = spirv.Variable : !spirv.ptr<f32, Function>
%1 = spirv.Variable : !spirv.ptr<f32, Function>
spirv.CopyMemory "Function" %0, "Function" %1 : f32
spirv.Return
}
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @copy_memory_different_storage_classes(%in : !spirv.ptr<!spirv.array<4xf32>, Input>, %out : !spirv.ptr<!spirv.array<4xf32>, Output>) "None" {
spirv.CopyMemory "Output" %out, "Input" %in : !spirv.array<4xf32>
spirv.Return
}
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @copy_memory_with_access_operands() "None" {
%0 = spirv.Variable : !spirv.ptr<f32, Function>
%1 = spirv.Variable : !spirv.ptr<f32, Function>
spirv.CopyMemory "Function" %0, "Function" %1 ["Aligned", 4] : f32
spirv.CopyMe... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @bit_cast(%arg0 : f32) "None" {
%0 = spirv.Bitcast %arg0 : f32 to i32
%1 = spirv.Bitcast %0 : i32 to si32
%2 = spirv.Bitcast %1 : si32 to ui32
spirv.Return
}
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @convert_f_to_s(%arg0 : f32) -> i32 "None" {
%0 = spirv.ConvertFToS %arg0 : f32 to i32
spirv.ReturnValue %0 : i32
}
spirv.func @convert_f64_to_s32(%arg0 : f64) -> i32 "None" {
%0 = spirv.ConvertFToS %arg0 : f64 to i32
... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Kernel], []> {
spirv.func @ptr_cast_to_generic(%arg0 : !spirv.ptr<f32, CrossWorkgroup>) "None" {
%0 = spirv.PtrCastToGeneric %arg0 : !spirv.ptr<f32, CrossWorkgroup> to !spirv.ptr<f32, Generic>
spirv.Return
}
spirv.func @generic_cast_to_ptr(%arg0 : !s... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Physical64 OpenCL requires #spirv.vce<v1.0, [Kernel, Addresses], []> {
spirv.func @covert_ptr_to_u(%arg0 : !spirv.ptr<i32, Generic>) "None" {
%0 = spirv.ConvertPtrToU %arg0 : !spirv.ptr<i32, Generic> to i32
spirv.Return
}
spirv.func @covert_ptr_to_u_truncate(%arg0 : !spirv.ptr<i64, Generic>) ... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module PhysicalStorageBuffer64 OpenCL requires #spirv.vce<v1.0, [Kernel, Addresses, PhysicalStorageBufferAddresses], []> {
spirv.func @covert_ptr_to_u_PhysicalStorageBuffer(%arg0 : !spirv.ptr<i32, PhysicalStorageBuffer>) "None" {
%0 = spirv.ConvertPtrToU %arg0 : !spirv.ptr<i32, PhysicalStorageBuffer> to i... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Physical64 OpenCL requires #spirv.vce<v1.0, [Kernel, Addresses], []> {
spirv.func @covert_u_to_ptr(%arg0 : i32) "None" {
%0 = spirv.ConvertUToPtr %arg0 : i32 to !spirv.ptr<i32, Generic>
spirv.Return
}
spirv.func @covert_u_to_ptr_truncate(%arg0 : i64) "None" {
%0 = spirv.ConvertUToPtr %arg... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module PhysicalStorageBuffer64 OpenCL requires #spirv.vce<v1.0, [Kernel, Addresses, PhysicalStorageBufferAddresses], []> {
spirv.func @covert_u_to_ptr_PhysicalStorageBuffer(%arg0 : i32) "None" {
%0 = spirv.ConvertUToPtr %arg0 : i32 to !spirv.ptr<i32, PhysicalStorageBuffer>
spirv.Return
}
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 bind(0, 1) : !spirv.ptr<!spirv.sampled_image<!spirv.image<f32, Dim1D, NoDepth, NonArrayed, SingleSampled, NoSampler, Unknown>>, UniformConstant>
spirv.GlobalVariable @var1 bind(0, 0) : !spirv.ptr<!spirv.sampled_image<!... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @composite_insert(%arg0 : !spirv.struct<(f32, !spirv.struct<(!spirv.array<4xf32>, f32)>)>, %arg1: !spirv.array<4xf32>) -> !spirv.struct<(f32, !spirv.struct<(!spirv.array<4xf32>, f32)>)> "None" {
%0 = spirv.CompositeInsert %arg1, %ar... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @array_stride(%arg0 : !spirv.ptr<!spirv.array<4x!spirv.array<4xf32, stride=4>, stride=128>, StorageBuffer>, %arg1 : i32, %arg2 : i32) "None" {
%2 = spirv.AccessChain %arg0[%arg1, %arg2] : !spirv.ptr<!spirv.array<4x!spirv.array<4xf32... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 : !spirv.ptr<!spirv.rtarray<f32, stride=4>, StorageBuffer>
spirv.GlobalVariable @var1 : !spirv.ptr<!spirv.rtarray<vector<4xf16>>, Input>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @foo() -> () "None" {
%0 = spirv.Undef : f32
%1 = spirv.Undef : f32
%2 = spirv.FAdd %0, %1 : f32
%3 = spirv.Undef : vector<4xi32>
%4 = spirv.CompositeExtract %3[1 : i32] : vector<4xi32>
%5 = spirv.Undef : !spirv.... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @ignore_unused_undef() -> () "None" {
%0 = spirv.Undef : f32
spirv.Return
}
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @bool_const() -> () "None" {
%0 = spirv.Constant true
%1 = spirv.Constant false
%2 = spirv.Variable init(%0): !spirv.ptr<i1, Function>
%3 = spirv.Variable init(%1): !spirv.ptr<i1, Function>
spirv.Return
}
spirv.f... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @fmul(%arg0 : f32, %arg1 : f32) "None" {
%0 = spirv.FMul %arg0, %arg1 : f32
spirv.Return
}
spirv.func @fadd(%arg0 : vector<4xf32>, %arg1 : vector<4xf32>) "None" {
%0 = spirv.FAdd %arg0, %arg1 : vector<4xf32>
spirv.Re... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @math(%arg0 : f32, %arg1 : f32, %arg2 : i32) "None" {
%0 = spirv.GL.Exp %arg0 : f32
%2 = spirv.GL.Sqrt %arg0 : f32
%3 = spirv.GL.Cos %arg0 : f32
%4 = spirv.GL.Sin %arg0 : f32
%5 = spirv.GL.Tan %arg0 : f32
%6 = sp... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var {location = 0 : i32} : !spirv.ptr<vector<4xf32>, Input>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var {no_perspective} : !spirv.ptr<vector<4xf32>, Input>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var {flat} : !spirv.ptr<si32, Input>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var1 bind(0, 0) {aliased} : !spirv.ptr<!spirv.struct<(!spirv.array<4xf32, stride=4>[0])>, StorageBuffer>
spirv.GlobalVariable @var2 bind(0, 0) {aliased} : !spirv.ptr<!spirv.struct<(vector<4xf32>[0])>, StorageBuffer>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var bind(0, 0) {non_readable} : !spirv.ptr<!spirv.struct<(!spirv.array<4xf32, stride=4>[0])>, StorageBuffer>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var bind(0, 0) {non_writable} : !spirv.ptr<!spirv.struct<(!spirv.array<4xf32, stride=4>[0])>, StorageBuffer>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var bind(0, 0) {restrict} : !spirv.ptr<!spirv.struct<(!spirv.array<4xf32, stride=4>[0])>, StorageBuffer>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var {location = 0 : i32, relaxed_precision} : !spirv.ptr<vector<4xf32>, Output>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Linkage], []> {
spirv.GlobalVariable @var1 {
linkage_attributes=#spirv.linkage_attributes<
linkage_name="outSideGlobalVar1",
linkage_type=<Import>
>
} : !spirv.ptr<f32, Private>
} | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @memory_barrier_0() -> () "None" {
spirv.MemoryBarrier <Device>, <Release|UniformMemory>
spirv.Return
}
spirv.func @memory_barrier_1() -> () "None" {
spirv.MemoryBarrier <Subgroup>, <AcquireRelease|SubgroupMemory>
sp... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @group_non_uniform_ballot(%predicate: i1) -> vector<4xi32> "None" {
%0 = spirv.GroupNonUniformBallot <Workgroup> %predicate : vector<4xi32>
spirv.ReturnValue %0: vector<4xi32>
}
spirv.func @group_non_uniform_broadcast(%value: ... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @image(%arg0 : !spirv.sampled_image<!spirv.image<f32, Dim2D, NoDepth, NonArrayed, SingleSampled, NeedSampler, Unknown>>, %arg1 : vector<4xf32>, %arg2 : f32) "None" {
%0 = spirv.Image %arg0 : !spirv.sampled_image<!spirv.image<f32, Di... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.SpecConstant @sc_true = true
spirv.SpecConstant @sc_false spec_id(1) = false
spirv.SpecConstant @sc_int = -5 : i32
spirv.SpecConstant @sc_float spec_id(5) = 1. : f32
spirv.SpecConstantComposite @scc (@sc_int, @sc_int) : !spirv.array<... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.SpecConstant @sc_f32_1 = 1.5 : f32
spirv.SpecConstant @sc_f32_2 = 2.5 : f32
spirv.SpecConstant @sc_f32_3 = 3.5 : f32
spirv.SpecConstant @sc_i32_1 = 1 : i32
spirv.SpecConstantComposite @scc_array (@sc_f32_1, @sc_f32_2, @sc_f32_3) : ... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.SpecConstant @sc_f32_1 = 1.5 : f32
spirv.SpecConstant @sc_f32_2 = 2.5 : f32
spirv.SpecConstant @sc_f32_3 = 3.5 : f32
spirv.SpecConstant @sc_i32_1 = 1 : i32
spirv.SpecConstantComposite @scc_array (@sc_f32_1, @sc_f32_2, @sc_f32_3) : ... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.SpecConstant @sc_i32_1 = 1 : i32
spirv.func @use_composite() -> (i32) "None" {
%0 = spirv.mlir.referenceof @sc_i32_1 : i32
%1 = spirv.Constant 0 : i32
%2 = spirv.SpecConstantOperation wraps "spirv.ISub"(%0, %1) : (i32, i32) -> ... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Bfloat16ConversionINTEL], [SPV_INTEL_bfloat16_conversion]> {
spirv.func @f32_to_bf16(%arg0 : f32) "None" {
%0 = spirv.INTEL.ConvertFToBF16 %arg0 : f32 to i16
spirv.Return
}
spirv.func @f32_to_bf16_vec(%arg0 : vector<2xf32>) "None" {
%0 = spirv.IN... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @test_int_atomics(%ptr: !spirv.ptr<i32, Workgroup>, %value: i32, %comparator: i32) -> i32 "None" {
%0 = spirv.AtomicCompareExchangeWeak "Workgroup" "Release" "Acquire" %ptr, %value, %comparator: !spirv.ptr<i32, Workgroup>
%1 = s... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var0 bind(1, 0) : !spirv.ptr<f32, Input>
spirv.GlobalVariable @var1 bind(0, 1) : !spirv.ptr<f32, Output>
spirv.GlobalVariable @var2 {built_in = "GlobalInvocationId"} : !spirv.ptr<vector<3xi32>, Input>
spirv.GlobalVariab... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @var1 : !spirv.ptr<f32, Input>
spirv.GlobalVariable @var2 initializer(@var1) bind(1, 0) : !spirv.ptr<f32, Input>
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.GlobalVariable @globalInvocationID built_in("GlobalInvocationId") : !spirv.ptr<vector<3xi32>, Input>
spirv.func @foo() "None" {
%0 = spirv.mlir.addressof @globalInvocationID : !spirv.ptr<vector<3xi32>, Input>
%1 = spirv.Constant 0:... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader, Linkage], []> {
spirv.GlobalVariable @var1 {
linkage_attributes=#spirv.linkage_attributes<
linkage_name="outSideGlobalVar1",
linkage_type=<Import>
>
} : !spirv.ptr<f32, Private>
} | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @subgroup_ballot(%predicate: i1) -> vector<4xi32> "None" {
%0 = spirv.KHR.SubgroupBallot %predicate: vector<4xi32>
spirv.ReturnValue %0: vector<4xi32>
}
spirv.func @group_broadcast_1(%value: f32, %localid: i32 ) -> f32 "None... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Physical64 OpenCL requires #spirv.vce<v1.0, [Kernel, Addresses], []> {
spirv.func @float_insts(%arg0 : f32) "None" {
%0 = spirv.CL.exp %arg0 : f32
%1 = spirv.CL.fabs %arg0 : f32
%2 = spirv.CL.sin %arg0 : f32
%3 = spirv.CL.cos %arg0 : f32
%4 = spirv.CL.log %arg0 : f32
%5 = spirv.CL... | mlir-translate -no-implicit-module -test-spirv-roundtrip | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @bitcount(%arg: i32) -> i32 "None" {
%0 = spirv.BitCount %arg : i32
spirv.ReturnValue %0 : i32
}
spirv.func @bit_field_insert(%base: vector<3xi32>, %insert: vector<3xi32>, %offset: i32, %count: i16) -> vector<3xi32> "None" {... | mlir-translate -no-implicit-module -test-spirv-roundtrip -split-input-file | 1 |
spirv.module Logical GLSL450 requires #spirv.vce<v1.0, [Shader], []> {
spirv.func @loop(%count : i32) -> () "None" {
%zero = spirv.Constant 0: i32
%one = spirv.Constant 1: i32
%var = spirv.Variable init(%zero) : !spirv.ptr<i32, Function>
spirv.mlir.loop {
spirv.Branch ^header
^header:
... | mlir-translate -no-implicit-module -split-input-file -test-spirv-roundtrip | 1 |
End of preview. Expand in Data Studio
- Downloads last month
- 8