build fails converting types
The bug says I reproduced on nightly, this is incorrect, just 2.17.0. @tenchirocom The latest stable TF version is 2.16 could you please try on the same?
Please ensure there are no conflicting flags that might be affecting the compilation. kindly try cleaning the build directory and rebuilding from scratch?
Thank you! This issue is stale because it has been open for 7 days with no activity. It will be closed if no further activity occurs. Thank you. This issue was closed because it has been inactive for 7 days since being marked as stale. Please reopen if you'd like to work on this further. Are you satisfied with the resolution of your issue?
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=Yes&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/63174">Yes</a>
<a href="https://docs.google.com/forms/d/e/1FAIpQLSfaP12TRhd9xSxjXZjcZFNXPGk4kc1-qMdv3gc6bEP90vY1ew/viewform?entry.85265664=No&entry.2137816233=https://github.com/tensorflow/tensorflow/issues/63174">No</a>

### Issue type

Build/Install

### Have you reproduced the bug with TensorFlow Nightly?

Yes

### Source

source

### TensorFlow version

2.17.0

### Custom code

No

### OS platform and distribution

Linux ubuntu 22.04

### Mobile device

_No response_

### Python version

3.10.12

### Bazel version

baselisk bazel version 6.5.0

### GCC/compiler version

11.4.0

### CUDA/cuDNN version

_No response_

### GPU model and memory

ATA, 16GB

### Current behavior?

successful build

### Standalone code to reproduce the issue

```shell
bazelisk build //tensorflow/tools/pip_package:build_pip_package
```


### Relevant log output

```shell
Build failed after substantial progress (approx 3 hours) with following output:

Starting local Bazel server and connecting to it...
INFO: Reading 'startup' options from /home/tower/tensorflow/.bazelrc: --windows_enab
le_symlinks
INFO: Options provided by the client:
  Inherited 'common' options: --isatty=1 --terminal_columns=84
INFO: Reading rc options for 'build' from /home/tower/tensorflow/.bazelrc:
  Inherited 'common' options: --experimental_repo_remote_exec
INFO: Reading rc options for 'build' from /home/tower/tensorflow/.bazelrc:
  'build' options: --define framework_shared_object=true --define tsl_protobuf_heade
r_only=true --define=use_fast_cpp_protos=true --define=allow_oversize_protos=true --
spawn_strategy=standalone -c opt --announce_rc --define=grpc_no_ares=true --noincomp
atible_remove_legacy_whole_archive --features=-force_no_whole_archive --enable_platf
orm_specific_config --define=with_xla_support=true --config=short_logs --config=v2 -
-define=no_aws_support=true --define=no_hdfs_support=true --experimental_cc_shared_l
ibrary --experimental_link_static_libraries_once=false --incompatible_enforce_config
_setting_visibility
INFO: Found applicable config definition build:short_logs in file /home/tower/tensor
flow/.bazelrc: --output_filter=DONT_MATCH_ANYTHING
INFO: Found applicable config definition build:v2 in file /home/tower/tensorflow/.ba
zelrc: --define=tf_api_version=2 --action_env=TF2_BEHAVIOR=1
INFO: Found applicable config definition build:linux in file /home/tower/tensorflow/
.bazelrc: --host_copt=-w --copt=-Wno-all --copt=-Wno-extra --copt=-Wno-deprecated --
copt=-Wno-deprecated-declarations --copt=-Wno-ignored-attributes --copt=-Wno-array-b
ounds --copt=-Wunused-result --copt=-Werror=unused-result --copt=-Wswitch --copt=-We
rror=switch --copt=-Wno-error=unused-but-set-variable --define=PREFIX=/usr --define=
LIBDIR=$(PREFIX)/lib --define=INCLUDEDIR=$(PREFIX)/include --define=PROTOBUF_INCLUDE
_PATH=$(PREFIX)/include --cxxopt=-std=c++17 --host_cxxopt=-std=c++17 --config=dynami
c_kernels --experimental_guard_against_concurrent_changes
INFO: Found applicable config definition build:dynamic_kernels in file /home/tower/t
ensorflow/.bazelrc: --define=dynamic_loaded_kernels=true --copt=-DAUTOLOAD_DYNAMIC_K
ERNELS
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (690 packages
 loaded, 43903 targets configured).
INFO: Found 1 target...
ERROR: /home/tower/tensorflow/tensorflow/compiler/mlir/quantization/stablehlo/BUILD:
46:11: Compiling tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolu
tion_to_nhwc.cc failed: (Exit 1): gcc failed: error executing command (from target /
/tensorflow/compiler/mlir/quantization/stablehlo:passes) /usr/lib/ccache/gcc -U_FORT
IFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-obje
ct -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-section
s ... (remaining 514 arguments skipped)
tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc:
In member function 'llvm::SmallVector<long int> mlir::quant::stablehlo::{anonymous}:
:RewriteNchwConvolutionToNhwc::PermuteShape(llvm::ArrayRef<long int>, llvm::ArrayRef
<long int>) const':
tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc:1
99: error: could not convert 'after_shape' from 'SmallVector<[...],4>' to 'SmallVect
or<[...],6>'
  199 |     return after_shape;
      |
Target //tensorflow/tools/pip_package:build_pip_package failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 65.905s, Critical Path: 38.66s
INFO: 17 processes: 9 internal, 8 local.
FAILED: Build did NOT complete successfully
```
