不是哥们

This commit is contained in:
shenjack 2024-10-16 22:05:19 +08:00
parent 664a100e80
commit ea6cd1554a
Signed by: shenjack
GPG Key ID: 7B1134A979775551
2 changed files with 5 additions and 6 deletions

View File

@ -5,5 +5,4 @@ edition = "2021"
[dependencies]
anyhow = { version = "1.0", features = ["backtrace"] }
opencl3 = { version = "0.9.5", features = ["serde",
"cl_khr_create_command_queue"] }
opencl3 = { version = "0.9.5", features = ["serde"] }

View File

@ -48,14 +48,14 @@ fn main() -> anyhow::Result<()> {
let context = Context::from_device(&device).expect("Context::from_device failed");
let property = CL_QUEUE_PROFILING_ENABLE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE;
let queue = match CommandQueue::create_with_properties_khr(
let queue = match CommandQueue::create_default_with_properties(
&context,
device_id,
&[], // 写死试试, 看起来没问题
0,
10, // 写死试试, 看起来没问题
) {
Ok(q) => q,
Err(err) => {
println!("创建命令队列失败: {}", err);
println!("创建命令队列失败: {}, 属性: {}", err, 0);
panic!();
}
};