[Mlir-commits] [mlir] [mlir][SPIRV] Add support for dense_resource in arith to spirv (PR #91318)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Wed May 15 07:39:18 PDT 2024
================
@@ -0,0 +1,38 @@
+// RUN: mlir-opt -split-input-file -convert-arith-to-spirv -verify-diagnostics %s | FileCheck %s
+
+
+//===----------------------------------------------------------------------===//
+// arith.constant dense_resource
+//
+// The decoding of dense_resource differs between little and big endian
+// machines. At the moment only litte endian is supported.
+// See https://github.com/llvm/llvm-project/issues/63469 for more infos.
+//
+//===----------------------------------------------------------------------===//
+
+// XFAIL: target=s390x-{{.*}}
+
+module attributes {
+ spirv.target_env = #spirv.target_env<
+ #spirv.vce<v1.0, [Int8, Int16, Int64, Float16, Float64], []>, #spirv.resource_limits<>>
+} {
+func.func @constant_dense_resource() {
+ // CHECK: %{{.*}} = spirv.Constant dense<[0.203224242, -0.254296064, -0.365104556, -0.469196141, 0.466041982]> : tensor<5xf32> : !spirv.array<5 x f32>
+ %0 = arith.constant dense_resource<dense_resource_test_5xf32> : tensor<5xf32>
----------------
maxbartel wrote:
Can you point me to a reference where this is use in MLIR? Looking at the tests in https://github.com/llvm/llvm-project/pull/78958 it also only uses dialect resources.
https://github.com/llvm/llvm-project/pull/91318
More information about the Mlir-commits
mailing list