-
Notifications
You must be signed in to change notification settings - Fork 209
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
Element-wise conversion to Duals #127
Labels
Comments
Looks like this is fixed now. julia> using ForwardDiff
julia> a = CuArray(ForwardDiff.Dual{Nothing}.([1.0,2.0,3.0]))
3-element CuArray{ForwardDiff.Dual{Nothing, Float64, 0}, 1, CUDA.Mem.DeviceBuffer}:
Dual{Nothing}(1.0)
Dual{Nothing}(2.0)
Dual{Nothing}(3.0)
julia> b = [1.0,2.0,3.0]
3-element Vector{Float64}:
1.0
2.0
3.0
julia> convert.(eltype(a),b) # Works
3-element Vector{ForwardDiff.Dual{Nothing, Float64, 0}}:
Dual{Nothing}(1.0)
Dual{Nothing}(2.0)
Dual{Nothing}(3.0)
julia> convert.(eltype(a),CuArray(b)) # Works
3-element CuArray{ForwardDiff.Dual{Nothing, Float64, 0}, 1, CUDA.Mem.DeviceBuffer}:
Dual{Nothing}(1.0)
Dual{Nothing}(2.0)
Dual{Nothing}(3.0) julia> versioninfo()
Julia Version 1.10.0-beta3
Commit 404750f8586 (2023-10-03 12:53 UTC)
Build Info:
Official https://julialang.org/ release
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 24 × Intel(R) Core(TM) i9-7920X CPU @ 2.90GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-15.0.7 (ORCJIT, skylake-avx512)
Threads: 30 on 24 virtual cores
Environment:
JULIA_NUM_PRECOMPILE_TASKS = 24
JULIA_DEPOT_PATH = /home/vedantpu/.julia
JULIA_PKG_DEVDIR = /home/vedantpu/.julia/dev
(MyPkg) pkg> st CUDA ForwardDiff
Project GeometryLearning v0.0.1
Status `~/.julia/dev/GeometryLearning.jl/Project.toml`
[052768ef] CUDA v5.0.0
[f6369f11] ForwardDiff v0.10.36 |
Great, thanks for checking! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MWE:
The text was updated successfully, but these errors were encountered: