collective_ops_test.cc
imports tsl/platform/blocking_counter.himports xla/tsl/platform/env.h
SHA-2564cb6c3beef7ea964e76499775bd9178c8ef016fc716ec43e9a09f35b87135a24
MaleculeMd₂(In₆Pa)
Evidence
1/* Copyright 2019 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 <algorithm>
17#include <cstdint>
18#include <limits>
19#include <memory>
20#include <string>
21#include <utility>
22#include <vector>
23
24#include "xla/tests/xla_test_backend_predicates.h"
25#include "absl/strings/str_replace.h"
26#include "absl/types/span.h"
27#include "ml_dtypes/include/float8.h"
28#include "xla/hlo/testlib/verified_hlo_module.h"
29#include "xla/literal.h"
30#include "xla/literal_util.h"
31#include "xla/primitive_util.h"
32#include "xla/service/computation_placer.h"
33#include "xla/service/hlo_module_config.h"
34#include "xla/tests/hlo_test_base.h"
35#include "xla/tests/literal_test_util.h"
36#include "xla/tests/test_utils.h"
37#include "xla/tsl/lib/core/status_test_util.h"
38#include "xla/tsl/platform/env.h"
39#include "xla/tsl/platform/logging.h"
40#include "xla/tsl/platform/statusor.h"
41#include "xla/tsl/platform/test.h"
42#include "xla/tsl/platform/threadpool.h"
43#include "xla/types.h"
44#include "tsl/platform/blocking_counter.h"
45
46namespace xla {
⋯5 lines
132:18… ica_idx = 0; replica_idx < kNumReplicas; replica_idx++) {
133 EXPECT_TRUE(LiteralTestUtil::NearOrEqual(
134 expected_value, results[replica_idx], ErrorSpec{1e-5, 1e-5}));
135 }
136 }
137
138 template <t …
528:13… /*use_threads=*/true, /*run_hlo_passes=*/true));
529
530 ASSERT_EQ(results.size(), 4);
531
532 std::vector<float> input_vec_doubled;
533 input_vec_doubled.reserve(input_vec.size());
534 for (float n : in …
1753:29… puts having an odd number of elements to ensure that
1754 // the 4 bits of padding are handled correctly.
1755 const char* const kModuleStr = R"(
1756 HloMod …