Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
This is a speculative PR for adding
Metal
as a supported device type.Merging this PR is not useful for simulations that depend on
ClimaCore
, since that package currently only supportsCUDA
. But, other packages likeCloudMicrophysics
may enjoy local GPU-enabled development without the need for an external server-based GPU. The broader Julia ecosystem may also enjoy this contribution, as this package is useful for non-CliMA projects too.Content
ClimaCommsMetalExt
extension that largely mirrors theClimaCommsCUDAExt
extension.README.md
,apis.md
,faqs.md
,index.md
,internals.md
, with description of the proposedMetal
support.MetalDevice
struct, and extended methods likedevice_type
anddevice
to make use of it.metal_ext_is_loaded
andmetal_is_required
to look forMetal
support, and extended the@import_required_backends
macro to loadMetal
when applicable.hygiene.jl
are now allFloat32
, which is required forMetal
runtests.jl
is successful onMetal
, but onlyFloat32
is tested. AnyFloat64
tests are skipped.test_cuda.jl
andtest_metal.jl
for convenient execution of tests on the respective devices. Can remove these files if not desired.test_metal.jl
is useful for manual testing since, as far as I know, we don't have easy access to a remote test server with aMetal
-compatible GPU. Given this, it may be useful to labelMetal
support as "experimental" or "untested" or similar.