mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-24 22:17:32 +00:00
Add int64 as a required type to ConstantOfShape as it's used by the pytorch converter for Pad. (#8128)
It's also used pointlessly for torch.tensor.repeat (although that usage should always be able to be constant folded).
This commit is contained in:
parent
b1e21312b5
commit
cccd61e3bc
1 changed files with 7 additions and 1 deletions
|
|
@ -10,7 +10,13 @@ namespace op_kernel_type_control {
|
|||
ORT_SPECIFY_OP_KERNEL_ARG_DEFAULT_TYPE_LIST_ALL_OPSETS(
|
||||
kCpuExecutionProvider, kOnnxDomain, ConstantOfShape, Output, 0,
|
||||
ConstantOfShapeDefaultOutputTypes);
|
||||
}
|
||||
|
||||
// pytorch converter uses ConstantOfShape with int64 to create Pad input
|
||||
// https://github.com/pytorch/pytorch/blob/044b519a80459f6787f6723c1c091a18b153d184/torch/onnx/symbolic_opset11.py#L449
|
||||
ORT_SPECIFY_OP_KERNEL_ARG_REQUIRED_TYPES_ALL_OPSETS(
|
||||
kCpuExecutionProvider, kOnnxDomain, ConstantOfShape, Output, 0,
|
||||
int64_t);
|
||||
} // namespace op_kernel_type_control
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue