You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Now that you explicitly set the device to create the tensor in some overloads I have a question. What happens if we call this with tensors that are on different devices? I presume it fails with a meaningful error message from the C++, but does it provide a useful traceback to where the error originated in the Fortran? I recall sometimes libtorch gives an error report, but no code location making it hard to work out where your Fortran is going wrong.
Making the modifications in the last commit on 248_get-dtype-devicetype_GPU-test - which attempts to assign a tensor on a CUDA device to a tensor on the CPU - I get the output
4: Test command: /home/joewa/software/FTorch/src/build/test/examples/3_MultiGPU/multigpu_infer_fortran "/home/joewa/software/FTorch/src/build/test/examples/3_MultiGPU/saved_multigpu_model_cuda.pt"
4: Working Directory: /home/joewa/software/FTorch/src/build/test/examples/3_MultiGPU
4: Test timeout computed to be: 1500
4: input on rank 0: [ 0.0, 1.0, 2.0, 3.0, 4.0]
4: output on rank 0: [*****, 0.0, 0.0, 0.0,*****]
4: MultiGPU example ran successfully
4/4 Test #4: multigpu_infer_fortran ........... Passed 8.12 sec
That is, it doesn't raise an error at all. So I guess we should build in errors for when you try to apply operator overloads to tensors on different devices.
Making the modifications in the last commit on 248_get-dtype-devicetype_GPU-test - which attempts to assign a tensor on a CUDA device to a tensor on the CPU - I get the output
That is, it doesn't raise an error at all. So I guess we should build in errors for when you try to apply operator overloads to tensors on different devices.
Originally posted by @jwallwork23 in #251 (comment)
The text was updated successfully, but these errors were encountered: