mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-25 19:48:11 +00:00
Fix registration for GatherGrad (#5382)
* Fix registration for GatherGrad to fix GatherGradOpTest.GatherGrad_axis0_indices2d_half. * Fix GatherGrad registration for CUDA also.
This commit is contained in:
parent
1cceefc7d4
commit
3a9a1a4ef1
3 changed files with 5 additions and 3 deletions
|
|
@ -446,7 +446,7 @@ void RegisterTrainingOpSchemas() {
|
|||
"Constrain input shape to integer tensors.")
|
||||
.TypeConstraint(
|
||||
"T",
|
||||
OpSchema::all_tensor_types_with_bfloat(),
|
||||
{"tensor(float16)", "tensor(float)", "tensor(double)"},
|
||||
"Constrain input and output types to float tensors.")
|
||||
.TypeConstraint(
|
||||
"Tind",
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ ONNX_OPERATOR_KERNEL_EX(
|
|||
kCpuExecutionProvider,
|
||||
KernelDefBuilder()
|
||||
.TypeConstraint("I", DataTypeImpl::GetTensorType<int64_t>())
|
||||
.TypeConstraint("T", DataTypeImpl::AllTensorTypes())
|
||||
.TypeConstraint("T", {DataTypeImpl::GetTensorType<float>(),
|
||||
DataTypeImpl::GetTensorType<double>()})
|
||||
.TypeConstraint("Tind", std::vector<MLDataType>{
|
||||
DataTypeImpl::GetTensorType<int32_t>(),
|
||||
DataTypeImpl::GetTensorType<int64_t>()}),
|
||||
|
|
|
|||
|
|
@ -16,7 +16,8 @@ ONNX_OPERATOR_KERNEL_EX(
|
|||
KernelDefBuilder()
|
||||
.InputMemoryType<OrtMemTypeCPUInput>(0)
|
||||
.TypeConstraint("I", DataTypeImpl::GetTensorType<int64_t>())
|
||||
.TypeConstraint("T", DataTypeImpl::AllFixedSizeTensorTypes())
|
||||
.TypeConstraint("T", {DataTypeImpl::GetTensorType<float>(),
|
||||
DataTypeImpl::GetTensorType<MLFloat16>()})
|
||||
.TypeConstraint("Tind", std::vector<MLDataType>{
|
||||
DataTypeImpl::GetTensorType<int32_t>(),
|
||||
DataTypeImpl::GetTensorType<int64_t>()}),
|
||||
|
|
|
|||
Loading…
Reference in a new issue