Skip to content

Commit

Permalink
fix windows build error.
Browse files Browse the repository at this point in the history
  • Loading branch information
weixingzhang committed Mar 24, 2020
1 parent f953bf9 commit e2047c1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cuda/tensor/pad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ Status Pad<T>::ComputeInternal(OpKernelContext* ctx) const {
TArray<fast_divmod> fdm_output_strides(dimension_count);
TensorPitches output_strides(output_dims);
for (auto i = 0; i < dimension_count; i++) {
fdm_output_strides[i] = fast_divmod(output_strides[i]);
fdm_output_strides[i] = fast_divmod(static_cast<int>(output_strides[i]));
}

PadImpl(
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cuda/tensor/scatter_elements.cc
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Status ScatterElements::ComputeInternal(OpKernelContext* context) const {
TArray<fast_divmod> fdm_indices_strides(rank);
TensorPitches indices_strides(indices_dims);
for (auto i = 0; i < rank; i++) {
fdm_indices_strides[i] = fast_divmod(indices_strides[i]);
fdm_indices_strides[i] = fast_divmod(static_cast<int>(indices_strides[i]));
}

MLDataType Tin_type = indices_tensor->DataType();
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cuda/tensor/tile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Status Tile<T>::ComputeInternal(OpKernelContext* ctx) const {
TArray<fast_divmod> fdm_output_strides(rank);
TensorPitches output_pitches(output_dims);
for (auto i = 0; i < rank; i++) {
fdm_output_strides[i] = fast_divmod(output_pitches[i]);
fdm_output_strides[i] = fast_divmod(static_cast<int>(output_pitches[i]));
}

if (output_tensor.Shape().Size() > 0) {
Expand Down
2 changes: 1 addition & 1 deletion onnxruntime/core/providers/cuda/tensor/upsample.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Status Upsample<T>::BaseCompute(OpKernelContext* context,
const std::vector<int64_t>& output_dims) const {
const Tensor* X = context->Input<Tensor>(0);
const std::vector<int64_t>& X_dims = X->Shape().GetDims();
auto rank = X_dims.size();
int32_t rank = static_cast<int32_t>(X_dims.size());

ORT_ENFORCE(output_dims.size() == rank, "Rank of input and output tensor should be same.");
if (rank == 0)
Expand Down

0 comments on commit e2047c1

Please sign in to comment.