kenba/opencl3

Undefined symbol: _clCreateCommandQueueWithProperties

Closed this issue · 2 comments

note: Undefined symbols for architecture arm64:
            "_clCreateCommandQueueWithProperties", referenced from:
                cl3::command_queue::create_command_queue_with_properties::hd9df949d333646c5 in libopencl3-a9d6a3f9c6cc0af6.rlib[8](opencl3-a9d6a3f9c6cc0af6.opencl3.cd10f36fcacf401-cgu.5.rcgu.o)
          ld: symbol(s) not found for architecture arm64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems to be just this function.

let queue =
        CommandQueue::create_default(&context, CL_QUEUE_PROFILING_ENABLE)
            .expect("CommandQueue::create_default failed");

works

let queue =
        CommandQueue::create_default_with_properties(&context, CL_QUEUE_PROFILING_ENABLE, 0)
            .expect("CommandQueue::create_default_with_properties failed");

does not

Brandon, CommandQueue::create_default_with_properties is a CL_VERSION_2_0 feature.
It sounds as if your arm64 OpenCL ICD does not support CL_VERSION_2_0 which is an opencl3 default feature.
To fix this, just use features ["CL_VERSION_1_1", "CL_VERSION_1_2"] and not the default features in your Cargo.toml file.

Apple M3, interesting… thank you!