愿景: GPU 连接组件永远不会运行,平面大小的门会拒绝每个设备
作者: antimora创建于 2026年9月28日更新于 2026年9月29日
标签bugperformance
crates/burn-vision/src/backends/cube/connected_components/hardware_accelerated.rs:493-502:
if props.plane_size_min == 32 && props.plane_size_max == 32 {
return Err("Requires plane size of at least 32".into());
}
// 不知道为什么,核函数在 AMD 和 Apple Silicon 上不工作。
if props.plane_size_max != 32 {
return Err("Requires plane size of at least 32".into());
}第一个检查拒绝了 32/32 (CUDA、Apple),第二个检查拒绝了其他所有情况,因此 hardware_accelerated 总是返回 Err。backends/cube/ops.rs:25,62 中的调用者在将图像读回主机后使用 cpu::connected_components。自 #3234 以来一直是这样;注释表明核函数是故意禁用的,但综合条件在所有地方都将其关闭,包括 NVIDIA。
内容来源: tracel-ai/burn