autotuner_test.cc
Google Test frameworkimports tsl/platform/path.h
SHA-2563a4359eb1e93f60736528b23454bec8bcef1091e77bb508ba1cceb6e29072fce
MaleculeMd₂(In₆Pa)
Evidence
1/* Copyright 2025 The OpenXLA Authors.
2
3Licensed under the Apache License, Version 2.0 (the "License");
4you may not use this file except in compliance with the License.
5You may obtain a copy of the License at
6
7 http://www.apache.org/licenses/LICENSE-2.0
8
9Unless required by applicable law or agreed to in writing, software
10distributed under the License is …
11:42… IND, either express or implied.
12See the License for the specific language governing permissions and
13limitations under the License.
14==============================================================================*/
15
16#include "xla/backends/autotuner/autotuner.h"
17
18#include <memory>
19#include <optional>
20#include <string>
21#include <utility>
22#include <vector>
23
24#include "google/protobuf/any.pb.h"
25#include <gmock/gmock.h>
26#include <gtest/gtest.h>
27#include "absl/status/status.h"
28#include "absl/status/status_matchers.h"
29#include "absl/status/statusor.h"
30#include "absl/strings/string_view.h"
31#include "absl/time/time.h"
32#include "absl/types/span.h"
33#include "google/protobuf/text_format.h"
34#include "xla/autotune_results.pb.h"
35#include "xla/autotuning.pb.h"
36#include "xla/backends/autotuner/autotuner_cache_interface.h"
37#include "xla/backends/autotuner/backends.pb.h"
38#include "xla/backends/autotuner/codegen_backend.h"
39#include "xla/backends/autotuner/profiler.h"
40#include "xla/backends/gpu/runtime/thunk.h"
41#include "xla/backends/gpu/runtime/thunk_executor.h"
42#include "xla/hlo/ir/hlo_instruction.h"
43#include "xla/hlo/ir/hlo_opcode.h"
44#include "xla/hlo/testlib/hlo_hardware_independent_test_base.h"
45#include "xla/literal_util.h"
46#include "xla/pjrt/distributed/key_value_store_interface.h"
47#include "xla/service/executable.h"
48#include "xla/service/gpu/backend_configs.pb.h"
49#include "xla/service/gpu/gpu_executable.h"
50#include "xla/service/shaped_buffer.h"
51#include "xla/shape.h"
52#include "xla/stream_executor/device_description.h"
53#include "xla/stream_executor/kernel_stats.h"
54#include "xla/tsl/distributed_runtime/call_options.h"
55#include "xla/tsl/distributed_runtime/coordination/coordination_service_agent.h"
56#include "xla/tsl/platform/env.h"
57#include "xla/tsl/platform/statusor.h"
58#include "xla/tsl/platform/test.h"
238:12… AT(autotuner, StatusIs(absl::StatusCode::kInvalidArgument));
239}
240
241TEST_F(AutotunerTest, NoCacheManager) {
242 auto device_description = CreateDummyDeviceDescription();
243 std::vector<std::unique_ptr<Code …
699:6… absl_testing::IsOk());
700 AutotuningLogs actual_logs;
701 EXPECT_TRUE(
702 tsl::protobuf::TextFormat::ParseFromString(content, &actual_logs));
703
704 AutotuningLogs expected_logs;
705 AutotuningLog* lo …
1127:24… false,\n"
1128 " \"allow_reg_spills\": false\n"
1129 "}";
1130 EXPECT_EQ(config.ToString(), expected);
1131}
1132
1133} // namespace
1134} // namespace xla