openxla / xla

A machine learning compiler for GPUs, CPUs, and ML accelerators
Apache License 2.0
2.4k stars 361 forks source link

[XLA] Give NumMappedDims() internal linkage and use a simple constant instead. #14376

Closed copybara-service[bot] closed 2 days ago

copybara-service[bot] commented 3 days ago

[XLA] Give NumMappedDims() internal linkage and use a simple constant instead.

Since this constant is only used inside the implementation of SpaceToBatchConverter, it can be made local to space_to_batch_converter.cc. This avoids a potential ODR collision if some other class were to attempt to define the symbol xla::NumMappedDims, which is a fairly generic name.