Repository navigation
Fix the build on aarch64 and CUDA 13 - #150
Merged
Merged
Conversation
-msse2 and -mfpmath=sse are x86-only options. On aarch64 (and ppc64le) the compiler rejects them outright, so every accelwattch translation unit fails before it is parsed -- 75 errors on a Grace/Blackwell host. Guard them on CMAKE_SYSTEM_PROCESSOR. x86 builds are unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
CUDA 13 removed clockRate, memoryClockRate and computeMode from cudaDeviceProp; applications are expected to use cudaDeviceGetAttribute instead. Assigning to the field no longer compiles against a 13.x toolkit. Guard the assignment on CUDART_VERSION so older toolkits keep reporting the shader clock exactly as before. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
asm("int $03") is an x86 instruction, so sst_gpgpu_sim::SST_cycle() fails to
assemble on aarch64. Emit "brk #0" there, keep "int $03" on x86, and fall
back to __builtin_trap() elsewhere. The debugger behaviour is the same.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Three independent build fixes needed to compile GPGPU-Sim on a GB300 (Grace-Blackwell, aarch64) with CUDA 13.2. Each is guarded, so x86 builds and pre-13 toolkits are bit-for-bit unchanged.
Companion to accel-sim/gpu-app-collection#91 (application-side CUDA 13 port) and accel-sim/accel-sim-framework#575 (hardware-run and tracer fixes).
1. AccelWattch passed x86-only SSE flags unconditionally
src/accelwattch/CMakeLists.txtadded-msse2 -mfpmath=sseto every release build. These are x86 options; aarch64 and ppc64le compilers reject them outright, so all 75 AccelWattch translation units failed before a single line was parsed.Guarded on
CMAKE_SYSTEM_PROCESSOR. The flags are an optimisation hint for x86 FP codegen, not a correctness requirement, so there is nothing to replace them with elsewhere.2.
cudaDeviceProp::clockRatewas removed in CUDA 13GPGPUSim_Init()assignedprop->clockRate = the_gpu->shader_clock(). CUDA 13 droppedclockRate,memoryClockRateandcomputeModefromcudaDevicePropin favour ofcudaDeviceGetAttribute(cudaDevAttrClockRate), so the assignment stopped compiling.Guarded on
CUDART_VERSION < 13000, matching the#if (CUDART_VERSION >= 2010)style already used a few lines below. Older toolkits keep reporting the shader clock exactly as before.Worth noting for a follow-up: on CUDA 13 a guest application calling
cudaDeviceGetAttribute(cudaDevAttrClockRate)will not get the simulated shader clock, because nothing inlibcudaservices that attribute yet. This PR only restores the build; wiring the attribute through is a separate change, and no benchmark in the collection currently depends on it.3.
asm("int $03")is an x86 instructionsst_gpgpu_sim::SST_cycle()used a rawint $03to break into an attached debugger under-gpgpu_single_step. The assembler rejects it on aarch64.Now
brk #0on aarch64,int $03on x86, and__builtin_trap()as a portable fallback. Same debugger behaviour.Testing
Built on a GB300 (aarch64, CUDA 13.2, driver 610.43.02) via the CMake flow —
accel-sim.outlinks successfully, 3,982,056 bytes. Before these three changes the build did not reach the link step.Each change is compiled out on x86 / CUDA 12 by its own guard, so existing configurations take the identical code path; I have not separately rebuilt on x86 to confirm that.
Deliberately out of scope
src/accelwattch/mcpat.mk,mcpatXeonCore.mkandcacti/cacti.mkcarry their own copies of the same SSE flags, and also hardcodeg++ -m64/-m32, which aarch64 GCC does not accept either. Porting that legacy make-based path is a larger job than removing two flags, and it is not the path the CMake build uses, so it is left alone here rather than half-fixed. It remains x86-only.🤖 Generated with Claude Code