Skip to content

Commit

Permalink
[xla:cpu] NFC: Move XLA:CPU runtime to xla/backends/cpu component
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 663069847
  • Loading branch information
ezhulenev authored and copybara-github committed Aug 14, 2024
1 parent ac359c4 commit 5b5f580
Show file tree
Hide file tree
Showing 85 changed files with 294 additions and 293 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/all_gather_thunk.h"
#include "xla/backends/cpu/runtime/all_gather_thunk.h"

#include <cstdint>
#include <memory>
Expand All @@ -24,11 +24,11 @@ limitations under the License.
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/collective_ops_utils.h"
#include "xla/service/cpu/collectives_interface.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tsl/concurrency/async_value_ref.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_ALL_GATHER_THUNK_H_
#define XLA_SERVICE_CPU_RUNTIME_ALL_GATHER_THUNK_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_ALL_GATHER_THUNK_H_
#define XLA_BACKENDS_CPU_RUNTIME_ALL_GATHER_THUNK_H_

#include <memory>

#include "absl/status/statusor.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "xla/xla_data.pb.h"

Expand All @@ -40,4 +40,4 @@ class AllGatherThunk final : public CollectiveThunk {

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_ALL_GATHER_THUNK_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_ALL_GATHER_THUNK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/all_reduce_thunk.h"
#include "xla/backends/cpu/runtime/all_reduce_thunk.h"

#include <cstdint>
#include <cstring>
Expand All @@ -26,12 +26,12 @@ limitations under the License.
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
#include "absl/types/span.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/primitive_util.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/collective_ops_utils.h"
#include "xla/service/cpu/collectives_interface.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tsl/concurrency/async_value_ref.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_ALL_REDUCE_THUNK_H_
#define XLA_SERVICE_CPU_RUNTIME_ALL_REDUCE_THUNK_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_ALL_REDUCE_THUNK_H_
#define XLA_BACKENDS_CPU_RUNTIME_ALL_REDUCE_THUNK_H_

#include <memory>

#include "absl/status/statusor.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/service/collective_ops_utils.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "xla/xla_data.pb.h"

Expand All @@ -45,4 +45,4 @@ class AllReduceThunk final : public CollectiveThunk {

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_ALL_REDUCE_THUNK_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_ALL_REDUCE_THUNK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/all_to_all_thunk.h"
#include "xla/backends/cpu/runtime/all_to_all_thunk.h"

#include <memory>
#include <utility>
Expand All @@ -23,11 +23,11 @@ limitations under the License.
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/strings/str_format.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/collective_ops_utils.h"
#include "xla/service/cpu/collectives_interface.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/tsl/concurrency/async_value_ref.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_ALL_TO_ALL_THUNK_H_
#define XLA_SERVICE_CPU_RUNTIME_ALL_TO_ALL_THUNK_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_ALL_TO_ALL_THUNK_H_
#define XLA_BACKENDS_CPU_RUNTIME_ALL_TO_ALL_THUNK_H_

#include <memory>

#include "absl/status/statusor.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "xla/xla_data.pb.h"

Expand All @@ -40,4 +40,4 @@ class AllToAllThunk final : public CollectiveThunk {

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_ALL_TO_ALL_THUNK_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_ALL_TO_ALL_THUNK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_BUFFER_ALLOCATIONS_H_
#define XLA_SERVICE_CPU_RUNTIME_BUFFER_ALLOCATIONS_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_BUFFER_ALLOCATIONS_H_
#define XLA_BACKENDS_CPU_RUNTIME_BUFFER_ALLOCATIONS_H_

#include <cstddef>
#include <cstdint>
Expand Down Expand Up @@ -141,4 +141,4 @@ BufferAllocations::GetDeviceAddressUnchecked(

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_BUFFER_ALLOCATIONS_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_BUFFER_ALLOCATIONS_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/buffer_allocations.h"
#include "xla/backends/cpu/runtime/buffer_allocations.h"

#include <cstddef>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/call_thunk.h"
#include "xla/backends/cpu/runtime/call_thunk.h"

#include <memory>
#include <utility>

#include "absl/memory/memory.h"
#include "absl/status/statusor.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/service/cpu/runtime/thunk_executor.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/backends/cpu/runtime/thunk_executor.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "tsl/platform/statusor.h"
#include "tsl/profiler/lib/traceme.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_CALL_THUNK_H_
#define XLA_SERVICE_CPU_RUNTIME_CALL_THUNK_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_CALL_THUNK_H_
#define XLA_BACKENDS_CPU_RUNTIME_CALL_THUNK_H_

#include <memory>

#include "absl/status/statusor.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/service/cpu/runtime/thunk_executor.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/backends/cpu/runtime/thunk_executor.h"
#include "xla/tsl/concurrency/async_value_ref.h"

namespace xla::cpu {
Expand All @@ -45,4 +45,4 @@ class CallThunk final : public Thunk {

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_CALL_THUNK_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_CALL_THUNK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/collective_permute_thunk.h"
#include "xla/backends/cpu/runtime/collective_permute_thunk.h"

#include <cstdint>
#include <memory>
Expand All @@ -28,12 +28,12 @@ limitations under the License.
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "absl/types/span.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/collective_ops_utils.h"
#include "xla/service/computation_placer.h"
#include "xla/service/cpu/collectives_interface.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/shape.h"
#include "xla/shape_util.h"
#include "xla/status_macros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_COLLECTIVE_PERMUTE_THUNK_H_
#define XLA_SERVICE_CPU_RUNTIME_COLLECTIVE_PERMUTE_THUNK_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_COLLECTIVE_PERMUTE_THUNK_H_
#define XLA_BACKENDS_CPU_RUNTIME_COLLECTIVE_PERMUTE_THUNK_H_

#include <cstdint>
#include <memory>
Expand All @@ -23,7 +23,7 @@ limitations under the License.

#include "absl/status/statusor.h"
#include "absl/types/span.h"
#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "xla/xla_data.pb.h"

Expand Down Expand Up @@ -51,4 +51,4 @@ class CollectivePermuteThunk final : public CollectiveThunk {

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_COLLECTIVE_PERMUTE_THUNK_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_COLLECTIVE_PERMUTE_THUNK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/collective_thunk.h"
#include "xla/backends/cpu/runtime/collective_thunk.h"

#include <cstddef>
#include <cstdint>
Expand All @@ -32,13 +32,13 @@ limitations under the License.
#include "absl/strings/str_join.h"
#include "absl/time/time.h"
#include "absl/types/span.h"
#include "xla/backends/cpu/runtime/resource_use.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/runtime/buffer_use.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/collective_ops_utils.h"
#include "xla/service/computation_placer.h"
#include "xla/service/cpu/collectives_interface.h"
#include "xla/service/cpu/runtime/resource_use.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/service/global_device_id.h"
#include "xla/shape.h"
#include "xla/status_macros.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_COLLECTIVE_THUNK_H_
#define XLA_SERVICE_CPU_RUNTIME_COLLECTIVE_THUNK_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_COLLECTIVE_THUNK_H_
#define XLA_BACKENDS_CPU_RUNTIME_COLLECTIVE_THUNK_H_

#include <cstdint>
#include <memory>
Expand All @@ -27,11 +27,11 @@ limitations under the License.
#include "absl/status/statusor.h"
#include "absl/time/time.h"
#include "absl/types/span.h"
#include "xla/backends/cpu/runtime/resource_use.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/collective_ops_utils.h"
#include "xla/service/cpu/collectives_interface.h"
#include "xla/service/cpu/runtime/resource_use.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/service/global_device_id.h"
#include "xla/shape.h"
#include "xla/stream_executor/device_memory.h"
Expand Down Expand Up @@ -122,4 +122,4 @@ class CollectiveThunk : public Thunk {

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_COLLECTIVE_THUNK_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_COLLECTIVE_THUNK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/conditional_thunk.h"
#include "xla/backends/cpu/runtime/conditional_thunk.h"

#include <cstdint>
#include <memory>
Expand All @@ -22,10 +22,10 @@ limitations under the License.

#include "absl/memory/memory.h"
#include "absl/strings/str_format.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/backends/cpu/runtime/thunk_executor.h"
#include "xla/runtime/buffer_use.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/service/cpu/runtime/thunk_executor.h"
#include "xla/stream_executor/device_memory.h"
#include "xla/tsl/concurrency/async_value_ref.h"
#include "xla/util.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#ifndef XLA_SERVICE_CPU_RUNTIME_CONDITIONAL_THUNK_H_
#define XLA_SERVICE_CPU_RUNTIME_CONDITIONAL_THUNK_H_
#ifndef XLA_BACKENDS_CPU_RUNTIME_CONDITIONAL_THUNK_H_
#define XLA_BACKENDS_CPU_RUNTIME_CONDITIONAL_THUNK_H_

#include <memory>
#include <vector>

#include "absl/status/statusor.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/backends/cpu/runtime/thunk_executor.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/service/cpu/runtime/thunk_executor.h"
#include "xla/tsl/concurrency/async_value_ref.h"

namespace xla::cpu {
Expand All @@ -48,4 +48,4 @@ class ConditionalThunk final : public Thunk {

} // namespace xla::cpu

#endif // XLA_SERVICE_CPU_RUNTIME_CONDITIONAL_THUNK_H_
#endif // XLA_BACKENDS_CPU_RUNTIME_CONDITIONAL_THUNK_H_
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

#include "xla/service/cpu/runtime/conditional_thunk.h"
#include "xla/backends/cpu/runtime/conditional_thunk.h"

#include <cstdint>
#include <memory>
#include <utility>
#include <vector>

#include "xla/backends/cpu/runtime/resource_use.h"
#include "xla/backends/cpu/runtime/thunk.h"
#include "xla/backends/cpu/runtime/thunk_testlib.h"
#include "xla/runtime/buffer_use.h"
#include "xla/service/buffer_assignment.h"
#include "xla/service/cpu/runtime/resource_use.h"
#include "xla/service/cpu/runtime/thunk.h"
#include "xla/service/cpu/runtime/thunk_testlib.h"
#include "tsl/platform/statusor.h"
#include "tsl/platform/test.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ limitations under the License.
==============================================================================*/
#define EIGEN_USE_THREADS

#include "xla/service/cpu/runtime/conv_impl.h"
#include "xla/backends/cpu/runtime/conv_impl.h"

namespace tensorflow::xla {

Expand Down
Loading

0 comments on commit 5b5f580

Please sign in to comment.