Python class
DevicePlacementPolicy
DevicePlacementPolicyβ
class max.graph.DevicePlacementPolicy(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)
Bases: Enum
Controls behavior when an op implicitly transfers a tensor to CPU.
Ops that only have CPU kernels must transfer non-CPU tensors before executing. This policy controls how that situation is reported:
Ignore: transfer silently, no message.Warn(default): emit aUserWarningnaming the op and the tracking ticket for GPU support.Error: raiseValueError, making the implicit transfer a hard build-time failure.
Pass via Graph(..., strict_device_placement=DevicePlacementPolicy.Error).
Errorβ
Error = 'error'
Ignoreβ
Ignore = 'ignore'
Warnβ
Warn = 'warn'
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!