[llvm] [Offload] Implement olMemFill (PR #154102)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 18 08:00:50 PDT 2025
================
@@ -2583,6 +2583,30 @@ struct AMDGPUDeviceTy : public GenericDeviceTy, AMDGenericDeviceTy {
return Plugin::success();
}
+ Error dataFillImpl(void *TgtPtr, const void *PatternPtr, int64_t PatternSize,
+ int64_t Size,
+ AsyncInfoWrapperTy &AsyncInfoWrapper) override {
+ hsa_status_t Status;
+
+ // We can use hsa_amd_memory_fill for this size, but it's not async so the
+ // queue needs to be synchronized first
+ if (PatternSize == 4) {
+ if (AsyncInfoWrapper.hasQueue())
+ if (auto Err = synchronize(AsyncInfoWrapper))
+ return Err;
+ Status = hsa_amd_memory_fill(TgtPtr, *(uint32_t *)(PatternPtr),
----------------
arsenm wrote:
static_cast
https://github.com/llvm/llvm-project/pull/154102
More information about the llvm-commits
mailing list