ILGPU v2.0: AOT + Cross-Platform Native SDK Support#1578
Open
m4rs-mt wants to merge 30 commits into
Open
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ry point. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…obEnqueueResponse) (part 1/2). Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…(part 1/2). Co-Authored-By: Claude <noreply@anthropic.com>
…(part 2/2). Co-Authored-By: Claude <noreply@anthropic.com>
…l usings. Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…tests (part 1/2). Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…ration tests (part 1/2). Co-Authored-By: Claude <noreply@anthropic.com>
…ration tests (part 2/2). Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
… framework. Co-Authored-By: Claude <noreply@anthropic.com>
…and ILGPUC.Tests projects in the solution file. Co-Authored-By: Claude <noreply@anthropic.com>
…ation. Co-Authored-By: Claude <noreply@anthropic.com>
a5c17ef to
7dfa449
Compare
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR introduces the bridge between the new AOT compiler and the vendor-specific native toolchains (CUDA's
nvcc, Apple'smetal, AMD'shipcc, Intel'socloc,clang), plus a remote compilation service that exposes the compiler over HTTP so CI jobs and developers without local GPU toolchains can offload PTX/Metal-IR/HIP generation.This PR is intentionally kept small: Docker images, test suite, CI redesign, and samples all land in the follow-up PRs so that reviewers of this PR can focus on the backend-infrastructure code itself.
The first two commits are PR placeholders (for the runtime-library PR and the AOT-compiler PR); once those land on
masterthey collapse into real merge commits.A note on authorship - AI warning
Some bits of the compiler-service work in this PR was done with AI-assistant pair programming (Claude via Claude Code).
What's in this PR
Native compiler bindings (
Src/ILGPUC.Compilers/, 17 files)Thin managed wrappers around the vendor toolchains. Each wrapper handles tool discovery, argument construction, subprocess invocation, and result parsing so
ILGPUCcan invoke them with a uniform API:MetalCompiler— wraps Apple'sxcrun metal.NvccCompiler— wraps NVIDIA'snvcc.HipccCompiler— wraps AMD'shipcc.OclocCompiler— wraps Intel's OpenCL offline compiler.ClangOpenCLCompiler— wrapsclang -x clfor OpenCL-on-anything fallback.Around them:
CompilerBase,CompilerManager,CompilerOptions,CompileRequest,CompilationResult,CompilationTarget,CompilationCapabilities,ICompiler,ICompilerManager,OutputType,ToolchainComponent.Remote compilation service (
Src/ILGPUC.CompilerService/, 16 files)An ASP.NET Core service that exposes the compiler over HTTP:
CompileController(fire-and-forget compile),JobsController(async compile queue),CapabilitiesController(report which backends this host supports),StatusController(health / readiness),BaseApiController.CompilationJob,IJobQueue,JobQueuefor async queued compilation.CompilationCache,ICacheso identical kernels don't get recompiled across requests.JobEnqueueResponse,StatusResponse,ErrorResponseDTOs.CompilerService tests (
Src/ILGPUC.CompilerService.Tests/, 11 files)Integration-level coverage for every endpoint:
MockServiceFixturespins up the service in-process for xUnit;Mocks/MockCompilerManagerlets tests run without the actual native toolchains installed.CompileEndpointTests,JobEndpointTests,StatusEndpointTests,CapabilitiesEndpointTests,CompileErrorTests.CachingTests(cache hit/miss behaviour),RemoteCompilerIntegrationTests(full round-trip through the async job queue).ILGPUC.CompilerService.Tests.csproj,GlobalUsings.cs.Solution and shared-config wiring
Src/ILGPU.slnregisters the three new projects (ILGPUC.Compilers,ILGPUC.CompilerService,ILGPUC.CompilerService.Tests).Src/.editorconfig,Src/Directory.Build.props,global.json,.gitignoreare synchronized with the ILGPUC tooling target framework.Scope boundary
No changes to
Src/docker/,Src/scripts/, any GitHub workflow file,Src/ILGPUC.Tests/,.gitmodules,Src/CLAUDE.md, orSamples/. Those land in follow-up PRs.Depends on
PR #1577
Fixes
Closes #1542.