Skip to content

[Pytorch upstream] "div_rn" get "nan" result. #5306

@etaf

Description

@etaf

Describe the bug

Hi team:
Since PR pytorch/pytorch#164144 land, Inductor start generate triton.language.div_rn for float number div.
And I foud a series of Inductor UTs get nan result and failed, eg:

python test/inductor/test_compile_subprocess.py GPUTests.test_var_correction_xpu
python test/inductor/test_torchinductor.py GPUTests.test_unspec_inputs_int8_xpu
python test/inductor/test_torchinductor_dynamic_shapes.py DynamicShapesGPUTests.test_div_by_zero_dynamic_shapes_xpu
python test/inductor/test_compiled_optimizers.py CompiledOptimizerParityTestsXPU.test_correctness_RAdam_use_closure_True_xpu_float32

I've verifed that cuda works well.
You may start with test_div_by_zero_dynamic_shapes_xpu, which should get inf but nan.

Environment details

PyTorch: main branch (37d57ac9cb7f538b812cf1d9851b55b46213fe15)
Triton: pined
GPU: PVC

Metadata

Metadata

Assignees

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions