Skip to content
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

Inference failure in adapt #79

Closed
charleskawczynski opened this issue Mar 4, 2024 · 1 comment · Fixed by #78 or #81
Closed

Inference failure in adapt #79

charleskawczynski opened this issue Mar 4, 2024 · 1 comment · Fixed by #78 or #81

Comments

@charleskawczynski
Copy link
Contributor

charleskawczynski commented Mar 4, 2024

Reproducer (GPU resources are required, and @show ClimaComms.device(cspace) should show CUDADevice):

#=
git clone https://github.com/CliMA/ClimaCore.jl
cd ClimaCore.jl/
julia --project=test
using Revise; include("../perf/cuda_adapt_inference.jl")
=#
using Revise
using Cthulhu,BenchmarkTools,CUDA,Adapt, Test,JET
import ClimaCore;
import ClimaComms;
import ClimaCore: Fields, Geometry, Spaces
import Base.Broadcast: broadcasted
FT = Float64;
context = ClimaComms.SingletonCommsContext()
cspace = Spaces.PointSpace(context, Geometry.XPoint(FT(π)))
@show ClimaComms.device(cspace)
ρ = Fields.Field(FT, cspace);
bc = broadcasted(*, 1, broadcasted(+, ρ, 1));
Adapt.adapt(CUDA.KernelAdaptor(), bc.args);

@test_opt ignored_modules = (CUDA,) Adapt.adapt(CUDA.KernelAdaptor(), bc.args);

You may need to have JET/CUDA/Test in your local environment for this reproducer to work.

@charleskawczynski
Copy link
Contributor Author

Reopened by #80.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants