Skip to content

Conversation

@ethanwee1
Copy link

@ethanwee1 ethanwee1 commented Jun 19, 2025

Fixes https://ontrack-internal.amd.com/browse/SWDEV-537835
Related to cf32479
Not a Navi specific failure:

  File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/testing/_internal/common_device_type.py", line 1412, in only_fn
    return fn(slf, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/var/lib/jenkins/pytorch/test/test_binary_ufuncs.py", line 1671, in test_cuda_tensor_pow_scalar_tensor
    self._test_pow(base, exp)
  File "/var/lib/jenkins/pytorch/test/test_binary_ufuncs.py", line 1482, in _test_pow
    self.assertEqual(actual, expected)
  File "/opt/conda/envs/py_3.12/lib/python3.12/site-packages/torch/testing/_internal/common_utils.py", line 4052, in assertEqual
    raise error_metas.pop()[0].to_error(
AssertionError: The values for attribute 'dtype' do not match: torch.float32 != torch.float64.

Using .to(actual) without specifying dtype/device assumes actual is a tensor or tensor-like, which may fail silently or promote. Fixed by explicitly matching dtype and device. Going from pytorch#107302
Fix:

root@ubb4-rack-22:/var/lib/jenkins/pytorch# TEST_CONFIG=default HIP_VISIBLE_DEVICES=0 PYTORCH_TEST_WITH_ROCM=1 python test/test_binary_ufuncs.py TestBinaryUfuncsCUDA.test_cuda_tensor_pow_scalar_tensor_cuda
/opt/conda/envs/py_3.12/lib/python3.12/site-packages/hypothesis/entry_points.py:23: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
  import pkg_resources

Running tests...
----------------------------------------------------------------------
.
----------------------------------------------------------------------
Ran 1 test in 0.141s

OK

Generating XML reports...
root@ubb4-rack-22:/var/lib/jenkins/pytorch# pip list | grep numpy
numpy                   2.1.2

@ethanwee1 ethanwee1 marked this pull request as ready for review June 19, 2025 21:02
@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Jun 19, 2025

Jenkins build for 7422caa08c622916d46a3a2143eb06071a088cb2 commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@rocm-repo-management-api
Copy link

rocm-repo-management-api bot commented Jul 1, 2025

Jenkins build for 9f6fe12178a54370d22fbe278cddd549222ddd76 commit finished as FAILURE
Links: Blue Ocean view / Build artifacts

@jithunnair-amd jithunnair-amd merged this pull request into rocm7.0_internal_testing Jul 7, 2025
0 of 5 checks passed
@jithunnair-amd jithunnair-amd deleted the rocm7.0_IT_numpy_dtype branch July 7, 2025 16:02
@jithunnair-amd jithunnair-amd changed the title [rocm7.0_internal_testing] Update test_binary_ufuncs.py [rocm7.0_internal_testing] Update test_binary_ufuncs.py after numpy upgrade Jul 7, 2025
@jithunnair-amd
Copy link
Collaborator

Accidentally did "Rebase and Merge", so squashed commits into e90934f and force pushed

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.

3 participants