diff --git a/Cargo.toml b/Cargo.toml index 8637a5a..8b64565 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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"] } diff --git a/src/main.rs b/src/main.rs index 2710722..76ade9a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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!(); } };