mlir 编译器学习笔记之三 -- 测试

发布时间:2026/8/5 16:18:05
mlir 编译器学习笔记之三 -- 测试 1、完成mlir测试用例的check 自动更新bishengir-opt xx.mlir --split-input-file -torch-decompose-complex-ops -convert-torch-to-hfusion | python mlir/utils/generate-test-checks.py --source xx.mlir -i2、CHECK对 [[ 有特殊的含义如果相应匹配则写为 {{\[\[}}]] 部分保持原样3、onnx和torch的dense resource均以小端方式存储module test_dense_i64_resource {func.func test_dense_i64_resource() - tensor2xi64 {%0 arith.constant dense_resourcetest_dense_i64_resource : tensor2xi64return %0 : tensor2xi64}}// The dense resource data are encoded withlittle endian{-#dialect_resources: {builtin: {test_dense_i64_resource: 0x0200000000000000000000000100000000000000}}#-}