Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GPU] Fix OSS compilation of previously disabled tests. #12538

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions xla/service/gpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1219,6 +1219,7 @@ xla_test(
"@llvm-project//llvm:ir_headers",
"@llvm-project//mlir:IR",
"@tsl//tsl/platform:status_matchers",
"@tsl//tsl/lib/core:status_test_util",
"@tsl//tsl/platform:statusor",
],
)
Expand Down
4 changes: 2 additions & 2 deletions xla/service/gpu/ir_emitter_triton_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ limitations under the License.
#include "absl/types/span.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/Support/raw_ostream.h"
#include "mlir/IR/MLIRContext.h" // from @llvm-project
#include "mlir/IR/MLIRContext.h" // from @llvm-project
#include "mlir/Pass/PassManager.h" // from @llvm-project
#include "xla/autotuning.pb.h"
#include "xla/error_spec.h"
Expand Down Expand Up @@ -5235,7 +5235,7 @@ ENTRY e {
})";

TritonGemmConfig config(32, 16, 128, 1, 1, 4);
ASSERT_OK(
TF_ASSERT_OK(
CreateTritonIrAndFileCheck(hlo_text, config, EmitMatMul, "triton_dot", R"(
CHECK: tt.dot
CHECK-NOT: inputPrecision = tf32
Expand Down
15 changes: 8 additions & 7 deletions xla/service/gpu/triton_support_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ limitations under the License.
#include "xla/stream_executor/device_description.h"
#include "xla/xla.pb.h"
#include "xla/xla_data.pb.h"
#include "tsl/lib/core/status_test_util.h"
#include "tsl/platform/status_matchers.h"
#include "tsl/platform/statusor.h"

Expand Down Expand Up @@ -165,7 +166,7 @@ ENTRY e {
hlo_query::GetFirstInstructionWithOpcode(*computation, opcode);
if (IsTritonSupportedInstruction(*instr, GetCudaComputeCapability())) {
float tolerance = getTolerance(data_type);
EXPECT_OK(ApplyFloatNormalization(module.get()));
TF_EXPECT_OK(ApplyFloatNormalization(module.get()));
EXPECT_TRUE(RunAndCompareNoHloPasses(
std::move(module), ErrorSpec{/*aabs=*/tolerance, /*arel=*/tolerance}));
} else {
Expand Down Expand Up @@ -246,7 +247,7 @@ ENTRY e {
hlo_query::GetFirstInstructionWithOpcode(*computation, opcode);
if (IsTritonSupportedInstruction(*instr, GetCudaComputeCapability())) {
float tolerance = getTolerance(data_type);
EXPECT_OK(ApplyFloatNormalization(module.get()));
TF_EXPECT_OK(ApplyFloatNormalization(module.get()));
EXPECT_TRUE(RunAndCompareNoHloPasses(
std::move(module), ErrorSpec{/*aabs=*/tolerance, /*arel=*/tolerance}));
} else {
Expand Down Expand Up @@ -329,7 +330,7 @@ ENTRY e {
hlo_query::GetFirstInstructionWithOpcode(*computation, opcode);
if (IsTritonSupportedInstruction(*instr, GetCudaComputeCapability())) {
float tolerance = getTolerance(data_type);
EXPECT_OK(ApplyFloatNormalization(module.get()));
TF_EXPECT_OK(ApplyFloatNormalization(module.get()));
EXPECT_TRUE(RunAndCompareNoHloPasses(
std::move(module), ErrorSpec{/*aabs=*/tolerance, /*arel=*/tolerance}));
} else {
Expand Down Expand Up @@ -393,7 +394,7 @@ ENTRY e {
hlo_query::GetFirstInstructionWithOpcode(*computation, opcode);
if (IsTritonSupportedInstruction(*instr, GetCudaComputeCapability())) {
float tolerance = getTolerance(data_type);
EXPECT_OK(ApplyFloatNormalization(module.get()));
TF_EXPECT_OK(ApplyFloatNormalization(module.get()));
EXPECT_TRUE(RunAndCompareNoHloPasses(
std::move(module), ErrorSpec{/*aabs=*/tolerance, /*arel=*/tolerance}));
} else {
Expand Down Expand Up @@ -449,7 +450,7 @@ ENTRY e {
const HloInstruction* instr =
hlo_query::GetFirstInstructionWithOpcode(*computation, opcode);
if (IsTritonSupportedInstruction(*instr, GetCudaComputeCapability())) {
EXPECT_OK(ApplyFloatNormalization(module.get()));
TF_EXPECT_OK(ApplyFloatNormalization(module.get()));
EXPECT_TRUE(RunAndCompareNoHloPasses(
std::move(module), ErrorSpec{/*aabs=*/2e-4, /*arel=*/2e-4}));
} else {
Expand Down Expand Up @@ -630,7 +631,7 @@ ENTRY main {
hlo_query::GetFirstInstructionWithOpcode(*computation, opcode);
if (IsTritonSupportedInstruction(*instr, GetCudaComputeCapability())) {
float tolerance = getTolerance(data_type);
EXPECT_OK(ApplyFloatNormalization(module.get()));
TF_EXPECT_OK(ApplyFloatNormalization(module.get()));
EXPECT_TRUE(RunAndCompareNoHloPasses(
std::move(module), ErrorSpec{/*aabs=*/tolerance, /*arel=*/tolerance}));
} else {
Expand Down Expand Up @@ -693,7 +694,7 @@ ENTRY main {
*computation, HloOpcode::kReduce);
EXPECT_TRUE(IsTritonSupportedInstruction(*instr, GetCudaComputeCapability())
.CanFuse());
EXPECT_OK(ApplyFloatNormalization(hlo_module.get()));
TF_EXPECT_OK(ApplyFloatNormalization(hlo_module.get()));
EXPECT_TRUE(RunAndCompareNoHloPasses(
std::move(hlo_module), ErrorSpec{/*aabs=*/2e-4, /*arel=*/2e-4}));
}
Expand Down
Loading