Skip to content

Commit 3feb2a1

Browse files
committed
[AMDGPU] Make __GCC_DESTRUCTIVE_SIZE 128 on AMDGPU
Summary: The cache line size on AMDGPU varies between 64 and 128 (The lowest L2 cache also goes to 256 on some architectures.) This macro is intended to present a size that will not cause destructive interference, so we choose the larger of those values.
1 parent d727eec commit 3feb2a1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

clang/lib/Basic/Targets/AMDGPU.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ class LLVM_LIBRARY_VISIBILITY AMDGPUTargetInfo final : public TargetInfo {
462462
}
463463

464464
bool hasHIPImageSupport() const override { return HasImage; }
465+
466+
std::pair<unsigned, unsigned> hardwareInterferenceSizes() const override {
467+
return std::make_pair(128, 128);
468+
}
465469
};
466470

467471
} // namespace targets

0 commit comments

Comments
 (0)