Xcode WatchOS&x2B;科雷姆

Xcode WatchOS&x2B;科雷姆,xcode,gpu,watchos,coreml,Xcode,Gpu,Watchos,Coreml,你好 我正在尝试在Apple Watch 3上运行我的CoreML模型。现在我有大约160%的cpu使用率,所以我在识别上有延迟 有没有办法使用GPU 我正在尝试设置“useCPUOnly=false”和MLModelConfiguration“computeUnits=.all”。没什么帮助 func prediction(data: MLMultiArray) throws -> ModelOutputProtocol { let options = MLPredictionO

你好

我正在尝试在Apple Watch 3上运行我的CoreML模型。现在我有大约160%的cpu使用率,所以我在识别上有延迟

有没有办法使用GPU

我正在尝试设置“useCPUOnly=false”和MLModelConfiguration“computeUnits=.all”。没什么帮助

func prediction(data: MLMultiArray) throws -> ModelOutputProtocol {
    let options = MLPredictionOptions()
    options.usesCPUOnly = false
    let input = ModelInput(windows: data)
    return try prediction(input: input, options: options)
}


let config = MLModelConfiguration()
config.computeUnits = .all
try model = Model(contentsOf: url, configuration: config)
因此,在CPU使用率方面,我看到160%,在GPU方面,我看到0


是的,我使用前台模式。

我不认为Apple Watch 3有GPU,它可能会向您展示这一点,只是因为较新的有GPU。请参阅wiki页面