jax icon indicating copy to clipboard operation
jax copied to clipboard

Unsupported ROCm Tests `tests/array_test.py`

Open JehandadKhan opened this issue 10 months ago • 3 comments

Description

The tests in tests/array_test.py are being skipped and need to be triaged to assess if they can be enabled. If they cant due to missing ROCm features, then we need to implement such a feature.

  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol_deletion
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol0
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol1
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol2
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol3
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol4
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol5
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol6
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol7
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol8
  • [ ] tests/array_test.py::JaxArrayTest::test_buffer_protocol9
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_1d_3
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_1d_4
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_1d_5
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(2, 3)_PartitionSpec('x', 'y')
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(2, 3)_PartitionSpec('x', None)
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(2, 3)_PartitionSpec(None, 'y')
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(3, 2)_PartitionSpec('x', 'y')
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(3, 2)_PartitionSpec('x', None)
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(3, 2)_PartitionSpec(None, 'y')
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(4, 2)_PartitionSpec('x', 'y')
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(4, 2)_PartitionSpec('x', None)
  • [x] tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(4, 2)_PartitionSpec(None, 'y')

System info (python version, jaxlib version, accelerator, etc.)

JAX version 0.8.0 MI300 Accelerator Independent of OS and Python version

JehandadKhan avatar Jan 14 '26 19:01 JehandadKhan

PR #34491 has been created to address this issue.

Summary of changes:

  • Changed @jtu.skip_on_devices("gpu") to @jtu.skip_on_devices("cuda") for two tests
  • Added TODO comments with issue reference for tracking
  • This enables ROCm hardware to run the tests and determine support status

The tests will now run on ROCm hardware, allowing proper triage of threefry PRNG partitioning support on AMD GPUs.

hrideymarwah15 avatar Jan 20 '26 20:01 hrideymarwah15

Fixed via https://github.com/jax-ml/jax/pull/34491

Resolved UTs

  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_1d_3
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_1d_4
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_1d_5
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(2, 3)_PartitionSpec('x', 'y')
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(2, 3)_PartitionSpec('x', None)
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(2, 3)_PartitionSpec(None, 'y')
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(3, 2)_PartitionSpec('x', 'y')
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(3, 2)_PartitionSpec('x', None)
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(3, 2)_PartitionSpec(None, 'y')
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(4, 2)_PartitionSpec('x', 'y')
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(4, 2)_PartitionSpec('x', None)
  • tests/array_test.py::RngShardingTest::test_random_bits_is_pure_map_2d_(4, 2)_PartitionSpec(None, 'y')

Shahzeb-AMD avatar Jan 23 '26 07:01 Shahzeb-AMD

The buffer protocol tests are designed to be CPU only.

JehandadKhan avatar Apr 06 '26 20:04 JehandadKhan