Skip to content

Adapt Neuron data type tests#8835

Merged
rpsilva-aws merged 1 commit intomasterfrom
rpsilva_neuron_dt
Mar 13, 2025
Merged

Adapt Neuron data type tests#8835
rpsilva-aws merged 1 commit intomasterfrom
rpsilva_neuron_dt

Conversation

@rpsilva-aws
Copy link
Copy Markdown
Collaborator

@rpsilva-aws rpsilva-aws commented Mar 13, 2025

In this PR, we make the assertions over the expected data type for Neuron tests more robust, and remove the BF16 tests, as I have already migrated, added additional coverage and generalized these to work for any device in a prior PR (https://github.com/pytorch/xla/blame/master/test/test_data_type.py#L31).

PJRT_DEVICE=NEURON, dtype=torch.float32, op_xla_dtype=f32, op=<built-in method floor_divide of type object at 0x7f31a081fec0>
PJRT_DEVICE=NEURON, dtype=torch.float64, op_xla_dtype=f32, op=<built-in method floor_divide of type object at 0x7f31a081fec0>
PJRT_DEVICE=NEURON, dtype=torch.int16, op_xla_dtype=s32, op=<built-in method add of type object at 0x7f31a081fec0>
PJRT_DEVICE=NEURON, dtype=torch.int32, op_xla_dtype=s32, op=<built-in method add of type object at 0x7f31a081fec0>
PJRT_DEVICE=NEURON, dtype=torch.int64, op_xla_dtype=s64, op=<built-in method add of type object at 0x7f31a081fec0>
PJRT_DEVICE=NEURON, dtype=torch.uint16, op_xla_dtype=u32, op=<built-in method add of type object at 0x7f31a081fec0>
PJRT_DEVICE=NEURON, dtype=torch.uint32, op_xla_dtype=u32, op=<built-in method add of type object at 0x7f31a081fec0>
PJRT_DEVICE=NEURON, dtype=torch.uint64, op_xla_dtype=u64, op=<built-in method add of type object at 0x7f31a081fec0>
.
----------------------------------------------------------------------
Ran 1 test in 9.655s

OK

@rpsilva-aws rpsilva-aws marked this pull request as ready for review March 13, 2025 20:10
@jeffhataws jeffhataws self-assigned this Mar 13, 2025
@rpsilva-aws
Copy link
Copy Markdown
Collaborator Author

Neuron-specific tests, validated with our own CI/CD. Saving the workflow here.

@rpsilva-aws rpsilva-aws merged commit bd46c0e into master Mar 13, 2025
@rpsilva-aws rpsilva-aws deleted the rpsilva_neuron_dt branch March 13, 2025 20:21
rpsilva-aws added a commit that referenced this pull request Mar 13, 2025
zpcore pushed a commit that referenced this pull request Mar 27, 2025
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.

2 participants