金属计算管道线程执行宽度

Metal compute pipeline thread execution width

MTLComputePipelineStatethreadExecutionWidth 属性 会即时改变吗?

基于它,我希望能够计算长期存在的 threadgroupsPerGridthreadsPerThreadgroup 属性,以便在每次调用 MTLComputeCommandEncoderdispatchThreadgroups(...) 时使用计算传递的方法。

如果更改,我预先计算的 threadgroupCountsthreadsPerThreadgroup 属性可能不再有效!

它不可能更改,因为它是 GPU 的硬件 属性(据我所知,通过研究和我的测试,目前 AMD 为 64 个,其他供应商为 32 个)几个 GPU。)