torch.mps.profiler.is_metal_capture_enabled¶ torch.mps.profiler.is_metal_capture_enabled()[source][source]¶ 检查 metal_capture 上下文管理器是否可用。要启用 Metal capture,请设置 MTL_CAPTURE_ENABLED 环境变量。 返回类型 bool