Skip to content

mikesha2/Metal.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metal.jl

Metal programming in Julia

With Metal.jl it's possible to program GPUs on macOS using the Metal programming framework. The package is very much a work-in-progress, and currently is only interesting to developers.

Requirements

  • Mac device with M-series chip
  • macOS Catalina 10.15 or newer (might also work on 10.14 but untested).
  • Julia 1.8 (this package currently requires LLVM 13)
  • This GPUCompiler fork

Metal API wrapper

For interactions with the Metal APIs, this package depends on a small C/ObjC dynamic library that wraps the ObjectiveC APIs with a C interface. This library is built during the build phase of Metal.jl.

Julia wrappers to this small C library have been built with Clang.jl, and can be regenerated by running julia --project=res/ res/wrap.jl from the project folder.

These low-level wrappers, along with some slightly higher-level Julia wrappers, are available in the MTL submodule exported by Metal.jl. All wrapped C functions and types start with the mt prefix, whereas the Julia wrappers are prefixed with Mtl.

Acknowledgements

The C library started by forking rcp/cmt, to whom goes the original credit. This package builds upon the experience of several Julia contributors to CUDA.jl, AMDGPU.jl, oneAPI.jl.

About

Metal programming in Julia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Julia 56.1%
  • C 21.9%
  • Objective-C 20.7%
  • Other 1.3%