Replace gsl::narrow with narrow in WebNN code (#22733)

Replace use of `gsl::narrow` with `narrow` to build for WebNN @snnn 

### Description

Building for WebNN with exceptions disabled cannot use `gsl::narrow`.
Replace with `narrow`

### Motivation and Context

Address issue #22712
This commit is contained in:
Sevag H 2024-11-05 13:22:34 -05:00 committed by GitHub
parent db72096d17
commit 00461d1205
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -73,8 +73,8 @@ Status SplitOpBuilder::AddToModelBuilderImpl(ModelBuilder& model_builder,
// Check that the splits evenly divide.
if (split_count > 0 && splits.empty() && input_shape[axis] % split_count != 0) {
// Divide inputs into variable size outputs:
splits.insert(splits.end(), split_count - 1, gsl::narrow<uint32_t>(input_shape[axis]) / split_count);
splits.insert(splits.end(), gsl::narrow<uint32_t>(input_shape[axis]) % split_count);
splits.insert(splits.end(), split_count - 1, narrow<uint32_t>(input_shape[axis]) / split_count);
splits.insert(splits.end(), narrow<uint32_t>(input_shape[axis]) % split_count);
}
if (splits.empty()) {