mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-25 18:11:15 +08:00
Add set_threadgroup_memory_length to CommandEncoder
This method exposes the Metal API's setThreadgroupMemoryLength functionality, which is needed when implementing custom kernels that require configuring threadgroup memory size. This allows for better performance tuning in specialized Metal compute operations that rely on shared threadgroup memory.
This commit is contained in:
parent
eca2f3eb97
commit
d197c18528
@ -95,6 +95,10 @@ struct CommandEncoder {
|
||||
return enc_->setBytes(&v, sizeof(T), idx);
|
||||
}
|
||||
|
||||
void set_threadgroup_memory_length(size_t length, NS::UInteger index) {
|
||||
enc_->setThreadgroupMemoryLength(length, index);
|
||||
}
|
||||
|
||||
ConcurrentContext start_concurrent() {
|
||||
return ConcurrentContext(*this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user