pytorch/test/torch_np
Nikita Shulga 764c02b78b [BE] Raise NotImplementedError (#155470)
When op is unimplemented for a specific dtype

Which makes more sense, than a RuntimeError

Example
```python
>>> import torch
>>> torch.nn.Hardshrink()(torch.randint(0, 5, (10,)))
NotImplementedError: "hardshrink_cpu" not implemented for 'Long'
```

release notes bc-breaking: After this release `NotImplementedError` exception will be raised when ATen operation is called on the combinaiton of input tensor dtypes it has not been implemented for

Mark few more unary ops as unimplemented to satisfy foreach testing error reporting consistency between CPU and CUDA

Pull Request resolved: https://github.com/pytorch/pytorch/pull/155470
Approved by: https://github.com/albanD, https://github.com/Skylion007
2025-06-13 22:07:03 +00:00
..
numpy_tests [BE] Raise NotImplementedError (#155470) 2025-06-13 22:07:03 +00:00
__init__.py
check_tests_conform.py
conftest.py
test_basic.py
test_binary_ufuncs.py
test_dtype.py
test_function_base.py
test_ndarray_methods.py
test_nep50_examples.py
test_random.py Use random64 in Fischer-Yates algorithm for large N (#143682) 2025-01-07 03:48:56 +00:00
test_reductions.py
test_scalars_0D_arrays.py
test_ufuncs_basic.py
test_unary_ufuncs.py