2 implementations of GpuDeviceId
Microsoft.ML.Core (1)
Environment\HostEnvironmentBase.cs (1)
333
public int?
GpuDeviceId
{ get; set; }
Microsoft.ML.Data (1)
MLContext.cs (1)
111
public int?
GpuDeviceId
1 write to GpuDeviceId
Microsoft.ML.Core (1)
Environment\HostEnvironmentBase.cs (1)
427
((IHostEnvironmentInternal)host).
GpuDeviceId
= GpuDeviceId;
5 references to GpuDeviceId
Microsoft.ML.OnnxTransformer (3)
OnnxCatalog.cs (2)
502
if (gpuDeviceId == null && env is Runtime.IHostEnvironmentInternal localEnvironment && localEnvironment.
GpuDeviceId
!= null)
504
gpuDeviceId = localEnvironment.
GpuDeviceId
;
OnnxTransform.cs (1)
224
options.GpuDeviceId = localEnvironment.
GpuDeviceId
;
Microsoft.ML.TorchSharp (2)
Utils\TorchUtils.cs (2)
39
var device = ((IHostEnvironmentInternal)env).
GpuDeviceId
!= null && cuda.is_available() ? CUDA : CPU;
40
if (((IHostEnvironmentInternal)env).FallbackToCpu == false && device == CPU && ((IHostEnvironmentInternal)env).
GpuDeviceId
!= null)