Skip to content

Conversation

@baominghelly
Copy link
Contributor

@baominghelly baominghelly commented Jan 21, 2026

Description

Add read tensor from file feature in dynamic ops test && fix display issue in kwargs

Test evidence

Code change test

  1. show tensor in kwargs:kwargs={epsilon=1e-05; out=(out_0: tensor(1, 4), float16, out_1: tensor(1, 4), float16); out_0=out_0: tensor(1, 4), float16; out_1=out_1: tensor(1, 4), float16})
python test/infinicore/run.py --ops add_rms_norm --nvidia 
🎯 Targeted operators: add_rms_norm
InfiniCore Operator Test Runner
Directory: /home/baoming/workplace/random_input/InfiniCore/test/infinicore/ops
Tests found: 1

✅  add_rms_norm: PASSED (code: 0)

============================================================
Testing AddRMSNorm on NVIDIA
============================================================
TestCase(AddRMSNorm - OUT_OF_PLACE - inputs=[in_0: tensor(1, 4), float16; in_1: tensor(1, 4), float16; in_2: tensor(4,), float16], kwargs={epsilon=1e-05; out_0=out_0: tensor(1, 4), float16; out_1=out_1: tensor(1, 4), float16})
✅ Output 0 comparison passed
✅ Output 1 comparison passed
✓ Passed
TestCase(AddRMSNorm - INPLACE(out) - inputs=[in_0: tensor(1, 4), float16; in_1: tensor(1, 4), float16; in_2: tensor(4,), float16], kwargs={epsilon=1e-05; out=(out_0: tensor(1, 4), float16, out_1: tensor(1, 4), float16); out_0=out_0: tensor(1, 4), float16; out_1=out_1: tensor(1, 4), float16})
✅ Output 0 comparison passed
✅ Output 1 comparison passed
✓ Passed
TestCase(AddRMSNorm - OUT_OF_PLACE - inputs=[in_0: tensor(1, 4), float16; in_1: tensor(1, 4), float16; in_2: tensor(4,), bfloat16], kwargs={epsilon=1e-05; out_0=out_0: tensor(1, 4), float16; out_1=out_1: tensor(1, 4), float16})
✅ Output 0 comparison passed
✅ Output 1 comparison passed
✓ Passed
TestCase(AddRMSNorm - INPLACE(out) - inputs=[in_0: tensor(1, 4), float16; in_1: tensor(1, 4), float16; in_2: tensor(4,), bfloat16], kwargs={epsilon=1e-05; out=(out_0: tensor(1, 4), float16, out_1: tensor(1, 4), float16); out_0=out_0: tensor(1, 4), float16; out_1=out_1: tensor(1, 4), float16})
✅ Output 0 comparison passed
✅ Output 1 comparison passed
✓ Passed
  1. Read tensor from file for dynamic test, will display with "[FROM_FILE]" mark.
python test/infinicore/run.py --load format_input_matmul_batch.0000.json --nvidia --save

[Config Processing]
📂 Processed 1 cases ready for execution.

🚀 Mode: Dynamic Execution
InfiniCore Operator Test Runner
Directory: Dynamic (1 cases)
Tests found: 1

✅  test_Matmul_0: PASSED (code: 0)

============================================================
Testing Matmul on NVIDIA
============================================================
TestCase(Matmul - OUT_OF_PLACE - inputs=[a: tensor(512, 512), float16 [FROM_FILE]; b: tensor(512, 512), float16 [FROM_FILE]])
✓ Passed

============================================================
TEST SUMMARY
Total tests: 1
Passed: 1
Success rate: 100.0%

All tests passed!
============================================================
💾 Saving to: test_report_20260121_152602_332.json
   ✅ Saved.

================================================================================
CUMULATIVE TEST SUMMARY
================================================================================
Total tests run: 1
Passed: 1
Failed: 0

✅ PASSED OPERATORS (1):
  test_Matmul_0

Success rate: 100.0%

🎉 All tests passed!

result json file

[
    {
        "operator": "Matmul",
        "device": "NVIDIA",
        "torch_op": "torch.matmul",
        "infinicore_op": "infinicore.matmul",
        "args": {"bench": null, "num_prerun": 10, "num_iterations": 100, "verbose": false, "debug": false},
        "testcases": [
            {
                "description": "Matmul - OUT_OF_PLACE",
                "inputs": [
                    {"name": "a", "shape": [512, 512], "dtype": "float16", "strides": null, "file_path": "/home/baoming/workplace/random_input/InfiniMetrics/test_ones/matmul.batch.20260121_122413_165204/data/a_512x512_float16_20260121_122413_166801.npy"}, 
                    {"name": "b", "shape": [512, 512], "dtype": "float16", "strides": null, "file_path": "/home/baoming/workplace/random_input/InfiniMetrics/test_ones/matmul.batch.20260121_122413_165204/data/b_512x512_float16_20260121_122413_167305.npy"}
                ],
                "kwargs": {},
                "result": {"status": {"success": true, "error": ""}, "perf_ms": {"torch": {"host": 0.0, "device": 0.0}, "infinicore": {"host": 0.0, "device": 0.0}}},
                "comparison_target": null, "tolerance": {"atol": 0, "rtol": 0.01}
            }
        ]
    }
]

Regression test

python test/infinicore/run.py --ops add matmul --nvidia                                                                                             
🎯 Targeted operators: matmul, add
InfiniCore Operator Test Runner
Directory: /home/baoming/workplace/random_input/InfiniCore/test/infinicore/ops
Tests found: 2

✅  matmul: PASSED (code: 0)

============================================================
Testing Matmul on NVIDIA
============================================================
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(2, 3), float16; in_1: tensor(3, 4), float16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(2, 3), float16; in_1: tensor(3, 4), float16], kwargs={out=tensor(2, 4), float16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(2, 3), bfloat16; in_1: tensor(3, 4), bfloat16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(2, 3), bfloat16; in_1: tensor(3, 4), bfloat16], kwargs={out=tensor(2, 4), bfloat16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(2, 3), float32; in_1: tensor(3, 4), float32])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(2, 3), float32; in_1: tensor(3, 4), float32], kwargs={out=tensor(2, 4), float32})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(128, 256), float16; in_1: tensor(256, 64), float16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(128, 256), float16; in_1: tensor(256, 64), float16], kwargs={out=tensor(128, 64), float16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(128, 256), bfloat16; in_1: tensor(256, 64), bfloat16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(128, 256), bfloat16; in_1: tensor(256, 64), bfloat16], kwargs={out=tensor(128, 64), bfloat16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(128, 256), float32; in_1: tensor(256, 64), float32])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(128, 256), float32; in_1: tensor(256, 64), float32], kwargs={out=tensor(128, 64), float32})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(2, 4, 2048), float16; in_1: tensor(2, 2048, 2048), float16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(2, 4, 2048), float16; in_1: tensor(2, 2048, 2048), float16], kwargs={out=tensor(2, 4, 2048), float16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(2, 4, 2048), bfloat16; in_1: tensor(2, 2048, 2048), bfloat16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(2, 4, 2048), bfloat16; in_1: tensor(2, 2048, 2048), bfloat16], kwargs={out=tensor(2, 4, 2048), bfloat16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(2, 4, 2048), float32; in_1: tensor(2, 2048, 2048), float32])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(2, 4, 2048), float32; in_1: tensor(2, 2048, 2048), float32], kwargs={out=tensor(2, 4, 2048), float32})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(4, 48, 64), float16; in_1: tensor(4, 64, 6), float16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(4, 48, 64), float16; in_1: tensor(4, 64, 6), float16], kwargs={out=tensor(4, 48, 6), float16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(4, 48, 64), bfloat16; in_1: tensor(4, 64, 6), bfloat16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(4, 48, 64), bfloat16; in_1: tensor(4, 64, 6), bfloat16], kwargs={out=tensor(4, 48, 6), bfloat16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(4, 48, 64), float32; in_1: tensor(4, 64, 6), float32])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(4, 48, 64), float32; in_1: tensor(4, 64, 6), float32], kwargs={out=tensor(4, 48, 6), float32})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(1, 2048), strides=(4096, 1), float16; in_1: tensor(2048, 2048), strides=(4096, 1), float16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(1, 2048), strides=(4096, 1), float16; in_1: tensor(2048, 2048), strides=(4096, 1), float16], kwargs={out=tensor(1, 2048), strides=(4096, 1), float16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(1, 2048), strides=(4096, 1), bfloat16; in_1: tensor(2048, 2048), strides=(4096, 1), bfloat16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(1, 2048), strides=(4096, 1), bfloat16; in_1: tensor(2048, 2048), strides=(4096, 1), bfloat16], kwargs={out=tensor(1, 2048), strides=(4096, 1), bfloat16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(1, 2048), strides=(4096, 1), float32; in_1: tensor(2048, 2048), strides=(4096, 1), float32])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(1, 2048), strides=(4096, 1), float32; in_1: tensor(2048, 2048), strides=(4096, 1), float32], kwargs={out=tensor(1, 2048), strides=(4096, 1), float32})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(6, 2048), strides=(2048, 1), float16; in_1: tensor(2048, 2560), strides=(1, 2048), float16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(6, 2048), strides=(2048, 1), float16; in_1: tensor(2048, 2560), strides=(1, 2048), float16], kwargs={out=tensor(6, 2560), strides=(2560, 1), float16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(6, 2048), strides=(2048, 1), bfloat16; in_1: tensor(2048, 2560), strides=(1, 2048), bfloat16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(6, 2048), strides=(2048, 1), bfloat16; in_1: tensor(2048, 2560), strides=(1, 2048), bfloat16], kwargs={out=tensor(6, 2560), strides=(2560, 1), bfloat16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(6, 2048), strides=(2048, 1), float32; in_1: tensor(2048, 2560), strides=(1, 2048), float32])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(6, 2048), strides=(2048, 1), float32; in_1: tensor(2048, 2560), strides=(1, 2048), float32], kwargs={out=tensor(6, 2560), strides=(2560, 1), float32})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(8, 16, 16), float16; in_1: tensor(8, 16, 32), float16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(8, 16, 16), float16; in_1: tensor(8, 16, 32), float16], kwargs={out=tensor(8, 16, 32), float16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(8, 16, 16), bfloat16; in_1: tensor(8, 16, 32), bfloat16])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(8, 16, 16), bfloat16; in_1: tensor(8, 16, 32), bfloat16], kwargs={out=tensor(8, 16, 32), bfloat16})
✓ Passed
TestCase(Matmul - OUT_OF_PLACE - inputs=[in_0: tensor(8, 16, 16), float32; in_1: tensor(8, 16, 32), float32])
✓ Passed
TestCase(Matmul - INPLACE(out) - inputs=[in_0: tensor(8, 16, 16), float32; in_1: tensor(8, 16, 32), float32], kwargs={out=tensor(8, 16, 32), float32})
✓ Passed

============================================================
TEST SUMMARY
Total tests: 42
Passed: 42
Success rate: 100.0%

All tests passed!
============================================================
✅  add: PASSED (code: 0)

============================================================
Testing Add on NVIDIA
============================================================
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16], kwargs={out=c: tensor(13, 4), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16], kwargs={out=c: tensor(13, 4), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32], kwargs={out=c: tensor(13, 4), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16], kwargs={out=c: tensor(13, 4), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16], kwargs={out=c: tensor(13, 4), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32], kwargs={out=c: tensor(13, 4), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16], kwargs={out=c: tensor(13, 4), strides=(10, 1), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), float16; b: tensor(13, 4), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16], kwargs={out=c: tensor(13, 4), strides=(10, 1), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), bfloat16; b: tensor(13, 4), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32], kwargs={out=c: tensor(13, 4), strides=(10, 1), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), float32; b: tensor(13, 4), float32], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16], kwargs={out=c: tensor(13, 4), strides=(10, 1), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), strides=(10, 1), float16; b: tensor(13, 4), strides=(10, 1), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16], kwargs={out=c: tensor(13, 4), strides=(10, 1), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), strides=(10, 1), bfloat16; b: tensor(13, 4), strides=(10, 1), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32], kwargs={out=c: tensor(13, 4), strides=(10, 1), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4), strides=(10, 1), float32; b: tensor(13, 4), strides=(10, 1), float32], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), float16; b: tensor(13, 4, 4), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), float16; b: tensor(13, 4, 4), float16], kwargs={out=c: tensor(13, 4, 4), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4, 4), float16; b: tensor(13, 4, 4), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4, 4), float16; b: tensor(13, 4, 4), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), bfloat16; b: tensor(13, 4, 4), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), bfloat16; b: tensor(13, 4, 4), bfloat16], kwargs={out=c: tensor(13, 4, 4), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4, 4), bfloat16; b: tensor(13, 4, 4), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4, 4), bfloat16; b: tensor(13, 4, 4), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), float32; b: tensor(13, 4, 4), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), float32; b: tensor(13, 4, 4), float32], kwargs={out=c: tensor(13, 4, 4), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4, 4), float32; b: tensor(13, 4, 4), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4, 4), float32; b: tensor(13, 4, 4), float32], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float16; b: tensor(13, 4, 4), strides=(20, 4, 1), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float16; b: tensor(13, 4, 4), strides=(20, 4, 1), float16], kwargs={out=c: tensor(13, 4, 4), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float16; b: tensor(13, 4, 4), strides=(20, 4, 1), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float16; b: tensor(13, 4, 4), strides=(20, 4, 1), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16; b: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16; b: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16], kwargs={out=c: tensor(13, 4, 4), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16; b: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16; b: tensor(13, 4, 4), strides=(20, 4, 1), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float32; b: tensor(13, 4, 4), strides=(20, 4, 1), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float32; b: tensor(13, 4, 4), strides=(20, 4, 1), float32], kwargs={out=c: tensor(13, 4, 4), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float32; b: tensor(13, 4, 4), strides=(20, 4, 1), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(13, 4, 4), strides=(20, 4, 1), float32; b: tensor(13, 4, 4), strides=(20, 4, 1), float32], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), strides=(4, 0, 1), float16; b: tensor(13, 4, 4), strides=(0, 4, 1), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), strides=(4, 0, 1), float16; b: tensor(13, 4, 4), strides=(0, 4, 1), float16], kwargs={out=c: tensor(13, 4, 4), float16})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), strides=(4, 0, 1), bfloat16; b: tensor(13, 4, 4), strides=(0, 4, 1), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), strides=(4, 0, 1), bfloat16; b: tensor(13, 4, 4), strides=(0, 4, 1), bfloat16], kwargs={out=c: tensor(13, 4, 4), bfloat16})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(13, 4, 4), strides=(4, 0, 1), float32; b: tensor(13, 4, 4), strides=(0, 4, 1), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(13, 4, 4), strides=(4, 0, 1), float32; b: tensor(13, 4, 4), strides=(0, 4, 1), float32], kwargs={out=c: tensor(13, 4, 4), float32})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(16, 5632), float16; b: tensor(16, 5632), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(16, 5632), float16; b: tensor(16, 5632), float16], kwargs={out=c: tensor(16, 5632), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(16, 5632), float16; b: tensor(16, 5632), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(16, 5632), float16; b: tensor(16, 5632), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(16, 5632), bfloat16; b: tensor(16, 5632), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(16, 5632), bfloat16; b: tensor(16, 5632), bfloat16], kwargs={out=c: tensor(16, 5632), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(16, 5632), bfloat16; b: tensor(16, 5632), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(16, 5632), bfloat16; b: tensor(16, 5632), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(16, 5632), float32; b: tensor(16, 5632), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(16, 5632), float32; b: tensor(16, 5632), float32], kwargs={out=c: tensor(16, 5632), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(16, 5632), float32; b: tensor(16, 5632), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(16, 5632), float32; b: tensor(16, 5632), float32], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(16, 5632), strides=(13312, 1), float16; b: tensor(16, 5632), strides=(13312, 1), float16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(16, 5632), strides=(13312, 1), float16; b: tensor(16, 5632), strides=(13312, 1), float16], kwargs={out=c: tensor(16, 5632), float16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(16, 5632), strides=(13312, 1), float16; b: tensor(16, 5632), strides=(13312, 1), float16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(16, 5632), strides=(13312, 1), float16; b: tensor(16, 5632), strides=(13312, 1), float16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(16, 5632), strides=(13312, 1), bfloat16; b: tensor(16, 5632), strides=(13312, 1), bfloat16])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(16, 5632), strides=(13312, 1), bfloat16; b: tensor(16, 5632), strides=(13312, 1), bfloat16], kwargs={out=c: tensor(16, 5632), bfloat16})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(16, 5632), strides=(13312, 1), bfloat16; b: tensor(16, 5632), strides=(13312, 1), bfloat16], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(16, 5632), strides=(13312, 1), bfloat16; b: tensor(16, 5632), strides=(13312, 1), bfloat16], kwargs={out=b})
✓ Passed
TestCase(Add - OUT_OF_PLACE - inputs=[a: tensor(16, 5632), strides=(13312, 1), float32; b: tensor(16, 5632), strides=(13312, 1), float32])
✓ Passed
TestCase(Add - INPLACE(out) - inputs=[a: tensor(16, 5632), strides=(13312, 1), float32; b: tensor(16, 5632), strides=(13312, 1), float32], kwargs={out=c: tensor(16, 5632), float32})
✓ Passed
TestCase(Add - INPLACE(a) - inputs=[a: tensor(16, 5632), strides=(13312, 1), float32; b: tensor(16, 5632), strides=(13312, 1), float32], kwargs={out=a})
✓ Passed
TestCase(Add - INPLACE(b) - inputs=[a: tensor(16, 5632), strides=(13312, 1), float32; b: tensor(16, 5632), strides=(13312, 1), float32], kwargs={out=b})
✓ Passed

============================================================
TEST SUMMARY
Total tests: 102
Passed: 102
Success rate: 100.0%

All tests passed!
============================================================

================================================================================
CUMULATIVE TEST SUMMARY
================================================================================
Total tests run: 2
Passed: 2
Failed: 0

✅ PASSED OPERATORS (2):
  matmul, add

Success rate: 100.0%

🎉 All tests passed!

@baominghelly baominghelly self-assigned this Jan 21, 2026
@baominghelly baominghelly requested a review from a team January 21, 2026 07:49
@baominghelly baominghelly linked an issue Jan 21, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DEV] 测试样例的输入张量从文件中读取

2 participants