Skip to content

ILGPU v2.0 Architecture - Apple Metal & AMD ROCm Accelerators#1576

Open
m4rs-mt wants to merge 79 commits intomasterfrom
new_architecture_v2
Open

ILGPU v2.0 Architecture - Apple Metal & AMD ROCm Accelerators#1576
m4rs-mt wants to merge 79 commits intomasterfrom
new_architecture_v2

Conversation

@m4rs-mt
Copy link
Copy Markdown
Owner

@m4rs-mt m4rs-mt commented Apr 19, 2026

Finishes the runtime library work begun in new_architecture (PR #1355) so the new Accelerator / Device / Kernel surface is complete and ready to host the new AOT compiler in the follow-up PR. All changes land under Src/ILGPU/ plus solution-file hygiene. It brings native Apple Metal and AMD ROCm support via new accelerators and runtime systems.

What's in this PR

  • Two new accelerator backends. Apple Metal and AMD ROCm are introduced as first-class peers to CUDA and OpenCL — each with its own API wrapper, Device, Accelerator, AcceleratorCapabilities, Kernel, CompiledKernel, MemoryBuffer, Stream, ProfilingMarker, and context extensions (11 files each).
  • CPU runtime rounded out. Adds the missing pieces that the previous PR left partial: CPUDevice, CPUAccelerator, CPUAcceleratorCapabilities, CPUKernel, CPUCompiledKernel, CPURuntimeView, CPUStream, CPUContextExtensions, plus the atomic / math / vector intrinsic emitters and page-lock refinements.
  • CUDA and OpenCL refinements. CudaAPI.Binary loader for driver-specific entry points, CLAcceleratorCapabilities descriptor, and updates to the existing CudaAccelerator / CudaKernel / CLDevice / CLMemoryBuffer classes to match the new abstractions. CudaDriverVersion and CudaArchitecture migrated to T4-generated tables.
  • Accelerator abstraction generalized. New AcceleratorArchitecture (renamed and generalized from the old Cuda-specific CudaArchitecture) and AcceleratorCapabilities descriptors; refined Accelerator, AcceleratorStream, Device, Kernel, CompiledKernel, AllocationManager, ArrayViewExtensions, and the top-level Context / Context.Builder / Context.KernelSource / Group / Warp / ArrayView.
  • ScanReduce reshaped. The IScanReduceOperation interface (52% similar) is renamed into ScanReduceTypes to better reflect its new role as a type collection. Extensions helper and T4 operation generator retired.
  • Legacy tests and analyzers retired. The old ILGPU.Tests, ILGPU.Tests.CPU, ILGPU.Tests.Cuda, ILGPU.Algorithms.Tests, ILGPU.Analyzers, and ILGPU.Analyzers.Tests projects are dropped — they are superseded by the ILGPUC-based test suite that lands in #BINDINGS-PR. Six removals in total, pruned from the solution file as the last commit.
  • Intermediate Debugging accelerator backend retired. Superseded by the finalized runtime surface.
  • Resources and T4 infrastructure cleaned. Runtime/compile-time error message tables refined; obsolete FormatString helper and legacy Capabilities T4 import retired.

Scope boundary

Nothing under Src/ILGPUC/, no changes to the new compiler, IR, backends, or tests. Those extensions will land later in follow-up PRs.

Depends on

PR #1355 must be merged first.

Fixes

Fixes #769, fixes #1248, fixes #1257, fixes #1263, fixes #1519, fixes #1369, closes #1268

closes #1107 - The newly enhanced runtime system enables basic building blocks that we may want to turn into a higher level library eventually.
closes #1535 - The new architecture will no longer support .Net Standard 2.1 - .Net 10 is the minimum requirement

m4rs-mt added 30 commits July 13, 2025 11:36
m4rs-mt added 17 commits August 1, 2025 20:25
…jects superseded by the ILGPUC-based test suite (part 6/9).
…jects superseded by the ILGPUC-based test suite (part 7/9).
…jects superseded by the ILGPUC-based test suite (part 8/9).
…jects superseded by the ILGPUC-based test suite (part 9/9).
@m4rs-mt m4rs-mt added this to the v2.0 milestone Apr 19, 2026
@m4rs-mt m4rs-mt force-pushed the new_architecture_v2 branch from ebd24b9 to 1ef6d01 Compare April 19, 2026 13:18
m4rs-mt added a commit that referenced this pull request Apr 19, 2026
m4rs-mt added a commit that referenced this pull request Apr 19, 2026
m4rs-mt added a commit that referenced this pull request Apr 19, 2026
m4rs-mt added a commit that referenced this pull request Apr 19, 2026
m4rs-mt added a commit that referenced this pull request Apr 19, 2026
m4rs-mt added a commit that referenced this pull request Apr 19, 2026
m4rs-mt added a commit that referenced this pull request Apr 19, 2026
m4rs-mt added a commit that referenced this pull request Apr 20, 2026
m4rs-mt added a commit that referenced this pull request Apr 20, 2026
m4rs-mt added a commit that referenced this pull request Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment