Switch ZML to use .host_pinned memory on ROCm, addressing missing host_unpinned memory error.

This commit is contained in:
Tarry Singh 2025-12-01 14:34:13 +00:00
parent 7894335dc9
commit ba5043ddf8

View File

@ -89,7 +89,9 @@ pub const Platform = struct {
const memory_target: pjrt.Memory.Kind = switch (memory) { const memory_target: pjrt.Memory.Kind = switch (memory) {
.host_unpinned => switch (platform.target) { .host_unpinned => switch (platform.target) {
// Cuda doesn't have host_unpinned. // Cuda doesn't have host_unpinned.
.cuda => .host_pinned, // ROCm doesn't seem to have it either.
// TODO(gwenzek): investigate why it was not forced before.
.cuda, .rocm => .host_pinned,
else => .host_unpinned, else => .host_unpinned,
}, },
inline else => |t| t, inline else => |t| t,