代码如下

//设置硬件
hv_DLDeviceHandles.Dispose();               
HOperatorSet.QueryAvailableDlDevices((new HTuple("runtime")).TupleConcat("id"),(new HTuple("gpu")).TupleConcat(0), out hv_DLDeviceHandles);
HOperatorSet.SetDlModelParam(hv_DLModelHandle,"device",hv_DLDeviceHandles.TupleSelect(0));

  试过,可以获取到cpu,不能获取gpu,如下,获取的gpu为空,求助!

 

 

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐