We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug Broadcast failure with a CuArray{Interval{Float32}}, even though it works fine with Interval{Float64}.
CuArray{Interval{Float32}}
Interval{Float64}
To Reproduce MWE for this bug:
julia> using IntervalArithmetic, CuArrays julia> a = Interval{Float32}[1, 2, 3]; julia> a2 = CuArray(a); julia> f(x) = x^2 - 2 f (generic function with 1 method) julia> f.(a2) ERROR: scalar getindex is disallowed Stacktrace: [1] error(::String) at ./error.jl:33 [2] assertscalar at /home/dpsanders/.julia/packages/GPUArrays/t8tJB/src/indexing.jl:8 [inlined] [3] getindex(::CuArray{Interval{Float32},1}, ::Int64) at /home/dpsanders/.julia/packages/GPUArrays/t8tJB/src/indexing.jl:44 [4] _broadcast_getindex at ./broadcast.jl:544 [inlined] [5] _getindex at ./broadcast.jl:575 [inlined] [6] _broadcast_getindex at ./broadcast.jl:550 [inlined] [7] getindex at ./broadcast.jl:511 [inlined] [8] copy at ./broadcast.jl:787 [inlined] [9] materialize(::Base.Broadcast.Broadcasted{Base.Broadcast.ArrayStyle{CuArray},Nothing,typeof(f),Tuple{CuArray{Interval{Float32},1}}}) at ./broadcast.jl:753 [10] top-level scope at none:0 julia> a = Interval{Float64}[1, 2, 3]; julia> a2 = CuArray(a); julia> f.(a2) 3-element CuArray{Interval{Float64},1}: [-1, -1] [2, 2] [7, 7]
Expected behavior The same as for 64-bit intervals.
Build log
# post the output of Pkg.build() # make sure the error still reproduces after that.
Environment details (please complete this section) Details on Julia:
julia> versioninfo() Julia Version 1.1.0 Commit 80516ca202 (2019-01-21 21:24 UTC) Platform Info: OS: Linux (x86_64-pc-linux-gnu) CPU: Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.1 (ORCJIT, broadwell)
Julia packages:
CUDA: toolkit and driver version (Don't know how to find this out)
The text was updated successfully, but these errors were encountered:
This looks like a type-inference issue since we are hitting the generic fallback, this indicates that the return type for f is abstract.
f
Sorry, something went wrong.
Apologies, you're right:
julia> using IntervalArithmetic julia> x = Interval{Float32}(3, 4) [3, 4] julia> @code_warntype x^2 Body::Union{Interval{Float32}, Interval{Float64}} ...
Is it possible to make the error message more explicit about this?
Successfully merging a pull request may close this issue.
Describe the bug
Broadcast failure with a
CuArray{Interval{Float32}}
, even though it works fine withInterval{Float64}
.To Reproduce
MWE for this bug:
Expected behavior
The same as for 64-bit intervals.
Build log
Environment details (please complete this section)
Details on Julia:
Julia packages:
CUDA: toolkit and driver version
(Don't know how to find this out)
The text was updated successfully, but these errors were encountered: