Mercurial > hg > CbC > CbC_llvm
view mlir/test/IR/dense-elements-hex.mlir @ 266:00f31e85ec16 default tip
Added tag current for changeset 31d058e83c98
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 14 Oct 2023 10:13:55 +0900 |
parents | 2e18cbf3894f |
children |
line wrap: on
line source
// RUN: mlir-opt -allow-unregistered-dialect %s -verify-diagnostics -split-input-file -mlir-print-elementsattrs-with-hex-if-larger=1 | FileCheck %s --check-prefix=HEX // RUN: mlir-opt -allow-unregistered-dialect %s -verify-diagnostics -split-input-file | FileCheck %s // HEX: dense<"0x000020410000A040"> : tensor<2xf32> "foo.op"() {dense.attr = dense<[10.0, 5.0]> : tensor<2xf32>} : () -> () // HEX: dense<"0x00000000000024400000000000001440"> : tensor<2xf64> "foo.op"() {dense.attr = dense<[10.0, 5.0]> : tensor<2xf64>} : () -> () // CHECK: dense<[1.000000e+01, 5.000000e+00]> : tensor<2xf32> "foo.op"() {dense.attr = dense<"0x000020410000A040"> : tensor<2xf32>} : () -> () // CHECK: dense<[1.000000e+01, 5.000000e+00]> : tensor<2xf64> "foo.op"() {dense.attr = dense<"0x00000000000024400000000000001440"> : tensor<2xf64>} : () -> () // CHECK: dense<(1.000000e+01,5.000000e+00)> : tensor<2xcomplex<f32>> "foo.op"() {dense.attr = dense<"0x000020410000A040000020410000A040"> : tensor<2xcomplex<f32>>} : () -> () // CHECK: dense<(1.000000e+01,5.000000e+00)> : tensor<2xcomplex<f64>> "foo.op"() {dense.attr = dense<"0x0000000000002440000000000000144000000000000024400000000000001440"> : tensor<2xcomplex<f64>>} : () -> () // CHECK: dense<[1.000000e+01, 5.000000e+00]> : tensor<2xbf16> "foo.op"() {dense.attr = dense<"0x2041A040"> : tensor<2xbf16>} : () -> () // ----- // expected-error@+1 {{expected string containing hex digits starting with `0x`}} "foo.op"() {dense.attr = dense<"00000000000024400000000000001440"> : tensor<2xf64>} : () -> () // ----- // expected-error@+1 {{expected string containing hex digits starting with `0x`}} "foo.op"() {dense.attr = dense<"0x0000000000002440000000000000144X"> : tensor<2xf64>} : () -> () // ----- // expected-error@+1 {{elements hex data size is invalid for provided type}} "foo.op"() {dense.attr = dense<"0x00000000000024400000000000001440"> : tensor<4xf64>} : () -> ()