mirror of
https://github.com/vosen/ZLUDA.git
synced 2025-08-08 17:19:19 +00:00
Fix more bugs
This commit is contained in:
parent
015d23b5ad
commit
b2765370e5
3 changed files with 5 additions and 1 deletions
|
@ -153,6 +153,7 @@ pub fn launch_kernel(
|
||||||
&mut [],
|
&mut [],
|
||||||
)?;
|
)?;
|
||||||
}
|
}
|
||||||
|
cmd_list.close()?;
|
||||||
stream.queue.execute_and_synchronize(cmd_list)?;
|
stream.queue.execute_and_synchronize(cmd_list)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
})?
|
})?
|
||||||
|
|
|
@ -14,6 +14,7 @@ pub fn copy_v2(dst: *mut c_void, src: *const c_void, bytesize: usize) -> Result<
|
||||||
GlobalState::lock_stream(stream::CU_STREAM_LEGACY, |stream| {
|
GlobalState::lock_stream(stream::CU_STREAM_LEGACY, |stream| {
|
||||||
let cmd_list = stream.command_list()?;
|
let cmd_list = stream.command_list()?;
|
||||||
unsafe { cmd_list.append_memory_copy_raw(dst, src, bytesize, None, &mut [])? };
|
unsafe { cmd_list.append_memory_copy_raw(dst, src, bytesize, None, &mut [])? };
|
||||||
|
cmd_list.close()?;
|
||||||
stream.queue.execute_and_synchronize(cmd_list)?;
|
stream.queue.execute_and_synchronize(cmd_list)?;
|
||||||
Ok::<_, CUresult>(())
|
Ok::<_, CUresult>(())
|
||||||
})?
|
})?
|
||||||
|
@ -40,6 +41,7 @@ pub(crate) fn set_d32_v2(dst: *mut c_void, mut ui: u32, n: usize) -> Result<(),
|
||||||
&mut [],
|
&mut [],
|
||||||
)
|
)
|
||||||
}?;
|
}?;
|
||||||
|
cmd_list.close()?;
|
||||||
stream.queue.execute_and_synchronize(cmd_list)?;
|
stream.queue.execute_and_synchronize(cmd_list)?;
|
||||||
Ok::<_, CUresult>(())
|
Ok::<_, CUresult>(())
|
||||||
})?
|
})?
|
||||||
|
@ -58,6 +60,7 @@ pub(crate) fn set_d8_v2(dst: *mut c_void, mut uc: u8, n: usize) -> Result<(), CU
|
||||||
&mut [],
|
&mut [],
|
||||||
)
|
)
|
||||||
}?;
|
}?;
|
||||||
|
cmd_list.close()?;
|
||||||
stream.queue.execute_and_synchronize(cmd_list)?;
|
stream.queue.execute_and_synchronize(cmd_list)?;
|
||||||
Ok::<_, CUresult>(())
|
Ok::<_, CUresult>(())
|
||||||
})?
|
})?
|
||||||
|
|
|
@ -2,7 +2,7 @@ use std::ffi::c_void;
|
||||||
use std::ptr;
|
use std::ptr;
|
||||||
|
|
||||||
pub unsafe fn heap_create() -> *mut c_void {
|
pub unsafe fn heap_create() -> *mut c_void {
|
||||||
ptr::null_mut()
|
usize::MAX as *mut _
|
||||||
}
|
}
|
||||||
|
|
||||||
pub unsafe fn heap_alloc(heap: *mut c_void, bytes: usize) -> *mut c_void {
|
pub unsafe fn heap_alloc(heap: *mut c_void, bytes: usize) -> *mut c_void {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue