Merge pull request #35519 from ROCmSoftwarePlatform:google_upstream_rocm_test_updates_191231
PiperOrigin-RevId: 302934524 Change-Id: I5e81e3398fdf18d52edb7d4d684ecc363d621405
This commit is contained in:
commit
3754f081a4
@ -12,7 +12,7 @@ load("@bazel_skylib//lib:paths.bzl", "paths")
|
||||
_default_test_file_exts = ["mlir", ".pbtxt", ".td"]
|
||||
_default_driver = "@llvm-project//mlir:run_lit.sh"
|
||||
_default_size = "small"
|
||||
_default_tags = ["no_rocm"]
|
||||
_default_tags = []
|
||||
|
||||
# These are patterns which we should never match, for tests, subdirectories, or
|
||||
# test input data files.
|
||||
|
@ -5,6 +5,11 @@ package(licenses = ["notice"])
|
||||
glob_lit_tests(
|
||||
data = [":test_utilities"],
|
||||
driver = "@llvm-project//mlir:run_lit.sh",
|
||||
tags_override = {
|
||||
"legalize-tf.mlir": ["no_rocm"],
|
||||
"optimize.mlir": ["no_rocm"],
|
||||
"prepare-tf.mlir": ["no_rocm"],
|
||||
},
|
||||
test_file_exts = ["mlir"],
|
||||
)
|
||||
|
||||
|
@ -8,6 +8,12 @@ glob_lit_tests(
|
||||
":test_utilities",
|
||||
],
|
||||
driver = "@llvm-project//mlir:run_lit.sh",
|
||||
tags_override = {
|
||||
"add.pbtxt": ["no_rocm"],
|
||||
"conv_2d.pbtxt": ["no_rocm"],
|
||||
"fake_quant_per_channel.pbtxt": ["no_rocm"],
|
||||
"ophint_lstm.pbtxt": ["no_rocm"],
|
||||
},
|
||||
test_file_exts = [
|
||||
"pbtxt",
|
||||
],
|
||||
|
@ -987,7 +987,6 @@ cc_library(
|
||||
tf_cc_test(
|
||||
name = "error_util_test",
|
||||
srcs = ["utils/error_util_test.cc"],
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":error_util",
|
||||
"//tensorflow/compiler/xla:test",
|
||||
|
@ -5,6 +5,10 @@ package(licenses = ["notice"])
|
||||
glob_lit_tests(
|
||||
data = [":test_utilities"],
|
||||
driver = "@llvm-project//mlir:run_lit.sh",
|
||||
tags_override = {
|
||||
"optimize.mlir": ["no_rocm"],
|
||||
"tf_optimize.mlir": ["no_rocm"],
|
||||
},
|
||||
test_file_exts = ["mlir"],
|
||||
)
|
||||
|
||||
|
@ -315,7 +315,7 @@ TEST_F(DeviceResDistTest, Workers2Devices2) {
|
||||
ValidateCollectiveParams(num_workers, num_devices);
|
||||
}
|
||||
|
||||
#ifndef GOOGLE_CUDA
|
||||
#if !GOOGLE_CUDA && !TENSORFLOW_USE_ROCM
|
||||
namespace {
|
||||
// A mock NcclReducer for testing group runtime details initialization with CPU
|
||||
// builds. The only meaningful function in this class is
|
||||
|
@ -551,9 +551,9 @@ TEST_F(ConstantFoldingTest, ConstantPushDownBiasAdd) {
|
||||
TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_ScalarConst) {
|
||||
for (string data_format : {
|
||||
"NHWC",
|
||||
#if GOOGLE_CUDA
|
||||
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
"NCHW"
|
||||
#endif // GOOGLE_CUDA
|
||||
#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
}) {
|
||||
MulConvPushDownTest(
|
||||
/*input_shape=*/data_format == "NHWC" ? TensorShape{4, 10, 10, 3}
|
||||
@ -569,9 +569,9 @@ TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_ScalarConst) {
|
||||
TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_SingletonConst) {
|
||||
for (string data_format : {
|
||||
"NHWC",
|
||||
#if GOOGLE_CUDA
|
||||
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
"NCHW"
|
||||
#endif // GOOGLE_CUDA
|
||||
#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
}) {
|
||||
for (auto mul_const_input_shape :
|
||||
{TensorShape{1}, TensorShape{1, 1, 1, 1}}) {
|
||||
@ -590,9 +590,9 @@ TEST_F(ConstantFoldingTest,
|
||||
MulConvPushDownTest_Conv2D_SingletonConst_ShapeMismatch) {
|
||||
for (string data_format : {
|
||||
"NHWC",
|
||||
#if GOOGLE_CUDA
|
||||
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
"NCHW"
|
||||
#endif // GOOGLE_CUDA
|
||||
#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
}) {
|
||||
MulConvPushDownTest(
|
||||
/*input_shape=*/data_format == "NHWC" ? TensorShape{4, 10, 10, 3}
|
||||
@ -608,9 +608,9 @@ TEST_F(ConstantFoldingTest,
|
||||
TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_3x1x3Const) {
|
||||
for (auto data_format : {
|
||||
"NHWC",
|
||||
#if GOOGLE_CUDA
|
||||
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
"NCHW"
|
||||
#endif // GOOGLE_CUDA
|
||||
#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
}) {
|
||||
MulConvPushDownTest(
|
||||
/*input_shape=*/{3, 3, 3, 3},
|
||||
@ -635,7 +635,7 @@ TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_NHWC_VectorLikeConst) {
|
||||
}
|
||||
}
|
||||
|
||||
#if GOOGLE_CUDA
|
||||
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_NCHW_VectorLikeConst) {
|
||||
for (auto mul_const_input_shape :
|
||||
{TensorShape{3}, TensorShape{3, 1, 1}, TensorShape{1, 3, 1, 1}}) {
|
||||
@ -649,14 +649,14 @@ TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_NCHW_VectorLikeConst) {
|
||||
/*expect_folded=*/false);
|
||||
}
|
||||
}
|
||||
#endif // GOOGLE_CUDA
|
||||
#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
|
||||
TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_3x1Const) {
|
||||
for (auto data_format : {
|
||||
"NHWC",
|
||||
#if GOOGLE_CUDA
|
||||
#if GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
"NCHW"
|
||||
#endif // GOOGLE_CUDA
|
||||
#endif // GOOGLE_CUDA || TENSORFLOW_USE_ROCM
|
||||
}) {
|
||||
MulConvPushDownTest(
|
||||
/*input_shape=*/{3, 3, 3, 3},
|
||||
@ -668,6 +668,9 @@ TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv2D_3x1Const) {
|
||||
}
|
||||
}
|
||||
|
||||
// This test fails on ROCm platform with two vaue miscompare
|
||||
// TODO(rocm) : analysze and fix the cause of the failure and re-enable test
|
||||
#ifndef TENSORFLOW_USE_ROCM
|
||||
TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv3D_NDHWC_1x1x3Const) {
|
||||
MulConvPushDownTest(
|
||||
/*input_shape=*/{3, 3, 3, 3, 3},
|
||||
@ -678,6 +681,7 @@ TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv3D_NDHWC_1x1x3Const) {
|
||||
/*data_format=*/"NDHWC",
|
||||
/*expect_folded=*/true);
|
||||
}
|
||||
#endif
|
||||
|
||||
TEST_F(ConstantFoldingTest, MulConvPushDownTest_Conv3D_NCDHW_3x1x1x1Const) {
|
||||
MulConvPushDownTest(
|
||||
|
@ -143,6 +143,7 @@ py_test(
|
||||
shard_count = 4,
|
||||
srcs_version = "PY2AND3",
|
||||
tags = [
|
||||
"no_rocm",
|
||||
"no_windows",
|
||||
],
|
||||
deps = [
|
||||
@ -159,6 +160,7 @@ py_test(
|
||||
python_version = "PY3",
|
||||
srcs_version = "PY2AND3",
|
||||
tags = [
|
||||
"no_rocm",
|
||||
"no_windows",
|
||||
],
|
||||
deps = [
|
||||
|
@ -3179,6 +3179,7 @@ tf_py_test(
|
||||
size = "small",
|
||||
srcs = ["ops/collective_ops_test.py"],
|
||||
python_version = "PY3",
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":client_testlib",
|
||||
":collective_ops",
|
||||
@ -6476,6 +6477,7 @@ tf_py_test(
|
||||
size = "small",
|
||||
srcs = ["framework/convert_to_constants_test.py"],
|
||||
python_version = "PY3",
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
"client_testlib",
|
||||
"framework_test_lib",
|
||||
@ -6500,7 +6502,10 @@ tf_py_test(
|
||||
size = "small",
|
||||
srcs = ["lib/io/file_io_test.py"],
|
||||
python_version = "PY3",
|
||||
tags = ["no_windows"],
|
||||
tags = [
|
||||
"no_rocm",
|
||||
"no_windows",
|
||||
],
|
||||
deps = [
|
||||
":client_testlib",
|
||||
":errors",
|
||||
|
@ -929,6 +929,7 @@ py_test(
|
||||
srcs = ["wrappers/framework_test.py"],
|
||||
python_version = "PY3",
|
||||
srcs_version = "PY2AND3",
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":debug_data",
|
||||
":framework",
|
||||
@ -1149,6 +1150,7 @@ py_test(
|
||||
srcs = ["cli/debugger_cli_common_test.py"],
|
||||
python_version = "PY3",
|
||||
srcs_version = "PY2AND3",
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":debugger_cli_common",
|
||||
"//tensorflow/python:framework_test_lib",
|
||||
|
@ -176,6 +176,7 @@ py_test(
|
||||
srcs = ["distribute_lib_test.py"],
|
||||
python_version = "PY3",
|
||||
srcs_version = "PY2AND3",
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":combinations",
|
||||
":distribute_lib",
|
||||
|
@ -113,6 +113,7 @@ tf_py_test(
|
||||
tags = [
|
||||
"no_cuda_on_cpu_tap",
|
||||
"no_pip",
|
||||
"no_rocm",
|
||||
"no_windows",
|
||||
],
|
||||
deps = [
|
||||
@ -165,6 +166,7 @@ tf_py_test(
|
||||
tags = [
|
||||
"no_cuda_on_cpu_tap",
|
||||
"no_pip",
|
||||
"no_rocm",
|
||||
"no_windows",
|
||||
],
|
||||
deps = [":feature_column_v2_test_main_lib"],
|
||||
|
@ -47,6 +47,7 @@ tf_py_test(
|
||||
size = "medium",
|
||||
srcs = ["applications_test.py"],
|
||||
shard_count = 36,
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":applications",
|
||||
"//tensorflow/python:client_testlib",
|
||||
|
@ -665,7 +665,10 @@ tf_py_test(
|
||||
srcs = ["gru_test.py"],
|
||||
python_version = "PY3",
|
||||
shard_count = 4,
|
||||
tags = ["notsan"], # http://b/62136390
|
||||
tags = [
|
||||
"no_rocm",
|
||||
"notsan", # http://b/62136390
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/python/keras",
|
||||
@ -682,6 +685,7 @@ tf_py_test(
|
||||
python_version = "PY3",
|
||||
shard_count = 4,
|
||||
tags = [
|
||||
"no_rocm",
|
||||
"noasan", # times out b/63678675
|
||||
"notsan", # http://b/62189182
|
||||
],
|
||||
|
@ -159,6 +159,7 @@ tf_py_test(
|
||||
srcs = ["pooling_test.py"],
|
||||
main = "pooling_test.py",
|
||||
python_version = "PY3",
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":pooling",
|
||||
"//tensorflow/python:array_ops",
|
||||
|
@ -142,6 +142,7 @@ tf_py_test(
|
||||
python_version = "PY3",
|
||||
shard_count = 4,
|
||||
tags = [
|
||||
"no_rocm",
|
||||
"no_windows",
|
||||
],
|
||||
deps = [
|
||||
|
@ -1093,6 +1093,7 @@ py_test(
|
||||
srcs = ["ragged_map_fn_op_test.py"],
|
||||
python_version = "PY3",
|
||||
srcs_version = "PY2AND3",
|
||||
tags = ["no_rocm"],
|
||||
deps = [
|
||||
":ragged", # fixdeps: keep
|
||||
":ragged_factory_ops",
|
||||
|
@ -32,6 +32,7 @@ py_test(
|
||||
"no_oss_py2",
|
||||
"no_oss_py35",
|
||||
"no_pip",
|
||||
"no_rocm",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/python:client_testlib",
|
||||
|
@ -26,6 +26,7 @@ py_test(
|
||||
tags = [
|
||||
"no_oss_py2",
|
||||
"no_pip",
|
||||
"no_rocm",
|
||||
"no_windows", # numpy prints differently on windows.
|
||||
"noasan",
|
||||
"nomsan",
|
||||
|
Loading…
Reference in New Issue
Block a user