-
Notifications
You must be signed in to change notification settings - Fork 222
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Views of Flux OneHotArrays #1349
Comments
CuArray is only used to represent contiguous or strided arrays, which isn't the case when you have a view with indices. The fact that some views are represented by a CuArray is already a stretch -- only done so because of load time issues when using The fact that |
Just so I have the correct understanding, can you answer the following two questions:
Thanks for the info |
No, views are just supported. Contiguous ones are represented by CuArray objects, all other views just use SubArray. Nothing impractical here.
That depends on Flux, but I think there's going to be missing functionality. E.g. CuSparseArray doesn't support broadcast. |
Okay, thanks for taking the time to answer my questions! |
The behviour of views and related functionality on CUDA arrays behaves as expected, but causes problems on Flux OneHotArrays. Specifically, the indices of the views aren't stored in a CUDA array which causes scalar indexing issues and an isbits error. The following example gives some insight into the issue, although it doesn't show the errors that eventually crop up:
This may be too niche of a problem, but it seems possible this could be an issue in other places where the structure isn't a CUDA array itself, but uses CUDA arrays. It would be nice if this could be automatically detected, and then view would put all indices on CUDA arrays.
The following code gets around the issue, but it doesn't seem ideal:
The text was updated successfully, but these errors were encountered: