Skip to content
This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jan 30, 2020

Make it more reasonable, and only convert to Float32 when dealing with arrays of floats.
Fixes #506, where the integer SubArray indices were converted to Float32 too.

Also reverts #522, because I realized it was wrong (not honoring the special Float32 conversion rules). @baggepinnen, why did you need this? The adapt-based functionality is inherently value based. However, adapt(CuArray, ...) not behaves as expected, so maybe you can use that?

@maleadt maleadt merged commit 5c5288c into master Jan 30, 2020
@bors bors bot deleted the tb/cu branch January 30, 2020 14:33
bors bot added a commit to FluxML/Flux.jl that referenced this pull request Feb 3, 2020
1013: Adapt to GPUArrays/CuArrays changes r=dhairyagandhi96 a=maleadt

Changes in response to JuliaGPU/GPUArrays.jl@a29df67 and JuliaGPU/CuArrays.jl#576. I suppose the next CuArrays release will need to be breaking because of this.

Maybe the `crossentropy` signature needs to be adjusted to support integer vectors, but I'll leave that decision up to Flux developers. This at least is the quick fix to get the tests passing again.

Co-authored-by: Tim Besard <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArgumentError when displaying a view of CuArray

1 participant