From f589b100653855eddaec6e979646220c19b26245 Mon Sep 17 00:00:00 2001 From: Andrzej Janik Date: Mon, 29 Apr 2024 13:06:18 +0000 Subject: Correctly report emulated wave32 CUDA device --- xtask/src/main.rs | 2 +- zluda/src/impl/device.rs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/xtask/src/main.rs b/xtask/src/main.rs index d5e0cf8..3f1f224 100644 --- a/xtask/src/main.rs +++ b/xtask/src/main.rs @@ -322,7 +322,7 @@ mod os { } } - pub fn zip(workspace: Workspace) -> i32 { + pub(crate) fn zip(workspace: Workspace) -> i32 { let mut target_file = workspace.target_directory.clone(); target_file.push("zluda.tar.gz"); let gz_file = File::create(target_file).unwrap(); diff --git a/zluda/src/impl/device.rs b/zluda/src/impl/device.rs index c7e8190..b7dd0f5 100644 --- a/zluda/src/impl/device.rs +++ b/zluda/src/impl/device.rs @@ -109,6 +109,10 @@ pub(crate) unsafe fn get_attribute( return Err(CUresult::CUDA_ERROR_INVALID_VALUE); } let hip_attrib = match attrib { + CUdevice_attribute::CU_DEVICE_ATTRIBUTE_WARP_SIZE => { + *pi = 32; + return Ok(()); + } CUdevice_attribute::CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT => { *pi = 1; return Ok(()); -- cgit v1.2.3