Skip to content

[Inductor][CPP] CPP GEMM Template WOQ int8 correctness failure #140208

@leslie-fang-intel

Description

@leslie-fang-intel

🐛 Describe the bug

python -u -m pytest -s -v test/inductor/test_cpu_select_algorithm.py -k test_int8_woq_mm_batch_size_32_in_features_128_out_features_65_cpu_bfloat16

python -u -m pytest -s -v test/inductor/test_cpu_select_algorithm.py -k test_int8_woq_mm_batch_size_32_in_features_144_out_features_65_cpu_bfloat16

Failure log

    timings = benchmark(choices)
  File "/home/leslie/community/pytorch/torch/_inductor/select_algorithm.py", line 1418, in autotune
    return make_benchmark_fn()(choices)
  File "/home/leslie/community/pytorch/torch/_inductor/select_algorithm.py", line 1611, in benchmark_in_current_process
    raise AssertionError(  # noqa: B904
torch._dynamo.exc.BackendCompilerFailed: backend='compile_fx_wrapper' raised:
AssertionError: Incorrect result from choice DataProcessorChoiceCallerWrapper(<torch._inductor.codegen.cpp_template_kernel.CppTemplateCaller object at 0x7f1e4f840c70>)

Tensor-likes are not close!

Mismatched elements: 2048 / 16640 (12.3%)
Greatest absolute difference: nan at index (0, 35) (up to 0.0001 allowed)
Greatest relative difference: nan at index (0, 35) (up to 0.0001 allowed)

Versions

PyTorch Commit:  ac6b6c6f98bcfdda8af89985ec3826b4c208a374 (HEAD -> viable/strict, origin/viable/strict)

[conda] mkl                       2024.2.2            ha957f24_15    conda-forge
[conda] mkl-include               2024.2.2            ha957f24_15    conda-forge
[conda] numpy                     1.26.0                   pypi_0    pypi
[conda] optree                    0.13.0                   pypi_0    pypi
[conda] torch                     2.6.0a0+gitac6b6c6           dev_0    <develop>
[conda] torchaudio                2.5.0a0+a95cfa8           dev_0    <develop>
[conda] torchdata                 0.10.0a0+2631c38           dev_0    <develop>
[conda] torchfix                  0.4.0                    pypi_0    pypi
[conda] torchtext                 0.17.0a0+1d4ce73           dev_0    <develop>
[conda] torchvision               0.20.0a0+945bdad           dev_0    <develop>

cc @ezyang @chauhang @penguinwu

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions