New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug when indexing 2D tensors using an MPS device #125100
Comments
Hey @joaquimgomez I think the issue is fixed on |
@ayush0x00 are you on Intel or Apple Silicon Mac? It works my M2, but it's very likely broken on Intel machines |
I am using it on Apple silicon M1. Not sure about intel machines then. Any way of verifying it on intel? |
@joaquimgomez could you verify if it works when using |
I tested it on a Linux machine with an Intel Xeon E5645 and it works. In my M2 Max, if |
@joaquimgomez I guess Apple has discontinued its support for Intel GPUs. Have a look at this thread. So unless you are working on Apple silicon, I think |
No, sorry for the misunderstanding. I'm working on an Apple Silicon, a MacBook Pro 14'' 2023 with an M2 Max. |
@joaquimgomez maybe try updating torch. It works fine on my mac, which runs M1 silicon. |
Tried to update torch without compiling it by myself and it works now. Thanks. |
馃悰 Describe the bug
When executing the following code using an MPS device:
x
istensor([-100, 0, 2, 0, 1, 0, 2, 0], device='mps:0')
, what is not correct.But when using CPU or CUDA as a device, the result is
tensor([1, 0, 2, 0, 1, 0, 2, 0])
, which is correct. The result is also correct whenx
is 1D or when it's 2D but the mask is in the CPU. The error also happens when usingtorch.masked_select
.Versions
PyTorch version: 2.2.2
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: macOS 14.4.1 (x86_64)
GCC version: Could not collect
Clang version: 14.0.3 (clang-1403.0.22.14.1)
CMake version: Could not collect
Libc version: N/A
Python version: 3.10.14 (main, Mar 21 2024, 11:24:58) [Clang 14.0.6 ] (64-bit runtime)
Python platform: macOS-10.16-x86_64-i386-64bit
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Apple M2 Max
Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.2.2
[pip3] torchaudio==2.2.2
[pip3] torchmetrics==1.3.2
[pip3] torchvision==0.17.2
[conda] numpy 1.26.4 pypi_0 pypi
[conda] torch 2.2.2 pypi_0 pypi
[conda] torchaudio 2.2.2 pypi_0 pypi
[conda] torchmetrics 1.3.2 pypi_0 pypi
[conda] torchvision 0.17.2 pypi_0 pypi
cc @frank-wei @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @kulinseth @albanD @malfet @DenisVieriu97 @jhavukainen
The text was updated successfully, but these errors were encountered: