llvm-project/mlir/test/Bytecode/bytecode_callback_with_custom_attribute.mlir
Matteo Franciolini 7ad9e9dcf5
[mlir][bytecode] Implements back deployment capability for MLIR dialects (#70724)
When emitting bytecode, clients can specify a target dialect version to
emit in `BytecodeWriterConfig`. This exposes a target dialect version to
the DialectBytecodeWriter, which can be queried by name and used to
back-deploy attributes, types, and properties.
2023-10-31 15:41:29 -07:00

15 lines
687 B
MLIR

// RUN: mlir-opt %s -split-input-file --test-bytecode-roundtrip="test-kind=3" | FileCheck %s --check-prefix=TEST_3
// RUN: mlir-opt %s -split-input-file --test-bytecode-roundtrip="test-kind=4" | FileCheck %s --check-prefix=TEST_4
"test.versionedC"() <{attribute = #test.attr_params<42, 24>}> : () -> ()
// TEST_3: Overriding TestAttrParamsAttr encoding...
// TEST_3: "test.versionedC"() <{attribute = dense<[42, 24]> : tensor<2xi32>}> : () -> ()
// -----
"test.versionedC"() <{attribute = dense<[42, 24]> : tensor<2xi32>}> : () -> ()
// TEST_4: Overriding parsing of TestAttrParamsAttr encoding...
// TEST_4: "test.versionedC"() <{attribute = #test.attr_params<42, 24>}> : () -> ()