Skip to content

Commit 17bd6fd

Browse files
committed
Fix the rank range of some operators (#136)
* softmax requires axis so the input can't be a scalar * split requires axis so the input can't be a scalar * triangular only supports input rank >= 2
1 parent 9e3fd42 commit 17bd6fd

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

services/webnn/ort/context_impl_ort.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,17 @@ ContextProperties ContextImplOrt::GetContextProperties() {
193193
/*sigmoid_input=*/{DataTypeConstraint::kFloat16To32, kMaxRank},
194194
/*slice_input=*/
195195
{DataTypeConstraint::kAllDataTypesAtLeast8bits, kMaxRank},
196-
/*softmax_input=*/{DataTypeConstraint::kFloat16To32, kMaxRank},
196+
/*softmax_input=*/{DataTypeConstraint::kFloat16To32, kNonScalarMaxRank},
197197
/*softplus_input=*/{},
198198
/*softsign_input=*/{},
199199
/*split_input=*/
200-
{DataTypeConstraint::kAllDataTypesAtLeast8bits, kMaxRank},
200+
{DataTypeConstraint::kAllDataTypesAtLeast8bits, kNonScalarMaxRank},
201201
/*tanh_input=*/{},
202202
/*tile_input=*/{},
203203
/*transpose_input=*/
204204
{DataTypeConstraint::kAllDataTypesAtLeast8bits, kMaxRank},
205205
/*triangular_input=*/
206-
{DataTypeConstraint::kAllDataTypesAtLeast8bits, kMaxRank},
206+
{DataTypeConstraint::kAllDataTypesAtLeast8bits, {2, 8}},
207207
/*where_condition=*/{DataTypeConstraint::kUint8, kMaxRank},
208208
/*where_value=*/
209209
{DataTypeConstraint::kAllDataTypesAtLeast8bits, kMaxRank}});

0 commit comments

Comments
 (0)