Skip to content

Commit 4dd9e2c

Browse files
zatkins-devjeremylt
andcommitted
Update comment for HIP defines
Co-authored-by: Jeremy L Thompson <jeremy@jeremylt.org>
1 parent 629a26b commit 4dd9e2c

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

backends/hip/ceed-hip-compile.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,15 @@ static int CeedCompileCore_Hip(Ceed ceed, const char *source, const char *name,
121121
if (runtime_version < 40400000) {
122122
code << "#include <hip/hip_runtime.h>\n\n";
123123
} else if (runtime_version < 70000000) {
124-
// With ROCm 4.5, need to include these definitions specifically for hiprtc (but cannot include the runtime header)
125124
code << "#include <stddef.h>\n";
125+
// With ROCm 4.5+, need to include these definitions specifically for hiprtc (but cannot include the runtime header)
126126
code << "#define __forceinline__ inline __attribute__((always_inline))\n";
127127
code << "#define HIP_DYNAMIC_SHARED(type, var) extern __shared__ type var[];\n\n";
128128
} else {
129+
// ROCm 7 removed stddef header, so we use the internal HIP types
129130
code << "using __hip_internal::int32_t;\n";
130131
code << "using __hip_internal::int64_t;\n";
132+
// With ROCm 4.5+, need to include these definitions specifically for hiprtc (but cannot include the runtime header)
131133
code << "#define __forceinline__ inline __attribute__((always_inline))\n";
132134
code << "#define HIP_DYNAMIC_SHARED(type, var) extern __shared__ type var[];\n\n";
133135
}

0 commit comments

Comments
 (0)