Fix x86 build error in GraphDescBuilder.cpp affecting packaging pipeline (#19045)

### Description
This addresses a 32 bit build error affecting the packaging pipeline



### Motivation and Context
<!-- - Why is this change required? What problem does it solve?
- If it fixes an open issue, please link to the issue here. -->
This commit is contained in:
Jeff Bloomfield 2024-01-08 17:49:19 -08:00 committed by GitHub
parent 99a8400e90
commit 975a315cd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -360,7 +360,7 @@ namespace Dml::GraphDescBuilder
// The tensor description's size should be no larger than the constant input unless it was rounded to
// the required alignment.
assert(((constantInput->GetTensorByteSize() + 3) & ~3) >= tensorDesc->totalTensorSizeInBytes);
size_t minimumConstantSize = std::min(constantInput->GetTensorByteSize(), tensorDesc->totalTensorSizeInBytes);
size_t minimumConstantSize = std::min(constantInput->GetTensorByteSize(), gsl::narrow_cast<size_t>(tensorDesc->totalTensorSizeInBytes));
auto data = static_cast<const uint8_t*>(constantInput->GetData());
std::vector<uint8_t> tensorData(data, data + minimumConstantSize);