torch.RegisterBackwardOptions
export interface RegisterBackwardOptions {
/**
* Optional dtype restriction.
* If specified, this autograd only applies to the given dtype.
* Use '*' for wildcard to match any dtype.
*/
readonly dtype?: AutogradDType;
/**
* Device restriction.
* Use '*' for wildcard to match any device.
* This is useful for composed backwards that use tensor operations
* which auto-dispatch to the correct kernel.
*/
readonly device: AutogradDevice;
}- readonly
dtype(AutogradDType)optional - – Optional dtype restriction. If specified, this autograd only applies to the given dtype. Use '*' for wildcard to match any dtype.
- readonly
device(AutogradDevice) - – Device restriction. Use '*' for wildcard to match any device. This is useful for composed backwards that use tensor operations which auto-dispatch to the correct kernel.
Options for register_backward.