gpu_too_many_blocks_test.cc
Google Test frameworkimports tsl/platform/statusor.h
SHA-256cb2b9f209c3339067c8e3fa1c8394bfe773e23ebb89b01cfb2ca0b99bb2c5457
MaleculeMd₂(In₂Pa)
Evidence
1/* Copyright 2021 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 <memory>
17#include <utility>
18
19#include <gmock/gmock.h>
20#include <gtest/gtest.h>
21#include "absl/status/statusor.h"
22#include "xla/hlo/ir/hlo_module.h"
23#include "xla/service/executable.h"
24#include "xla/service/gpu/tests/gpu_codegen_test.h"
25#include "xla/stream_executor/stream_executor_memory_allocator.h"
26#include "tsl/platform/statusor.h"
27#include "tsl/platform/test.h"
28
29namespace xla {
⋯4 lines
34class TooManyBlocksTest : public GpuCodegenTest {};
35
36TEST_F(TooManyBlocksTest, FailsWithInvalidStatus) {
37 // This test ensures that invalid (too large) launch grids are caught
38 // somewhere in the pipeline. The practical relev …
38:62… w, since as of
39 // 2024, the inputs or outputs have to be way too large to fit on any GPU
40 // anyway.
41 const char* hlo_text = R"(
42HloModule primi …