CliMA / CliMA/ClimaCore.jl

Better align inference and constant propagation between CPU and GPU kernels

Open
#1,858 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Julia
Stars
117
Forks
19
Avg merge
3d 4h
Merged PRs (30d)
41

Description

In #1847, I realized/remembered that while `@inline` does not have any impact on gpu kernels, as we use CUDA's `always_inline` and forcefully inline, this is not used on the CPU, and since inlining impacts inference, there is a mismatch between CPU and GPU inference, which is perhaps why some of our GPU tests are broken.

That is to say: if we were to inline more things on the CPU, we may start seeing CPU inference failures, that align with inference failures we see on the GPU, which may help us debug the GPU inference failures.

I think that the fix here is to inline more kernel utility functions. I tried this in #1847, and the CPU started allocating / failing inference, but we may need a more systematic approach.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named; start by reviewing the CPU and GPU kernel utilities discussed in #1847 and compare their inference and constant-propagation behavior. Done means the CPU and GPU paths use a systematic, aligned inlining approach without introducing CPU inference failures, and the affected GPU tests no longer fail.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
hpc, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.