Skip to content

Commit b681c69

Browse files
okada-shogoclaude
andcommitted
poly: build Inkling 2's DSpark screen on HIP
The HIP build of strata-poly stopped at inkling2.cu since 8ddd416: the screen kernels (scr_base_kernel, scr_step_kernel, scr_final_kernel) call __ldcs and __ldcg on uint4, uint32_t, float and float2, and HIP has those two only for halves ("no matching function for call to '__ldcs'", ten errors, ROCm 7.2.4, gfx1201). On HIP they are now plain loads: the screen uses them as cache hints, on a copy's words read once and on candidates that earlier launches wrote. CUDA builds compile the same code as before (the definitions are under __HIPCC__). Class: same bits on CUDA; HIP did not build before. Inkling 2 is VecSzn's engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Erqa3PhC87SPTfVSKZ3Ri5
1 parent d1f711e commit b681c69

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎engine/src/poly/inkling2.cu‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ void launched(const char* what) {
3939
throw std::runtime_error(std::string(what) + ": " + cudaGetErrorString(e));
4040
}
4141

42+
#if defined(__HIPCC__)
43+
// HIP has __ldcs and __ldcg for halves only. The DSpark screen's are cache hints (a copy's words read once, the
44+
// tiles' candidates from earlier launches), so on HIP they are plain loads.
45+
template <typename T> __device__ __forceinline__ T __ldcs(const T* p) { return *p; }
46+
template <typename T> __device__ __forceinline__ T __ldcg(const T* p) { return *p; }
47+
#endif
48+
4249
constexpr int WARP = 32; // the lanes a shuffle spans: a warp, or half of a 64-lane wavefront
4350

4451
// The warp's sum of x, in every lane.

0 commit comments

Comments
 (0)