From fb2f10e281582739ed272cde89a989210cbfa88a Mon Sep 17 00:00:00 2001 From: Deven Desai Date: Thu, 8 Aug 2019 20:38:52 +0000 Subject: [PATCH] disabling subtests that test features not yet supported on the ROCm platform --- tensorflow/c/eager/c_api_experimental_test.cc | 3 +++ tensorflow/core/kernels/conv_ops_test.cc | 5 +++++ tensorflow/python/kernel_tests/init_ops_test.py | 7 +++++++ 3 files changed, 15 insertions(+) diff --git a/tensorflow/c/eager/c_api_experimental_test.cc b/tensorflow/c/eager/c_api_experimental_test.cc index 34f325cc2b5..e5dc4f44ac5 100644 --- a/tensorflow/c/eager/c_api_experimental_test.cc +++ b/tensorflow/c/eager/c_api_experimental_test.cc @@ -83,7 +83,10 @@ void ExecuteWithProfiling(bool async) { if (!gpu_device_name.empty()) { EXPECT_TRUE(HasSubstr(profile_proto_str, "/device:GPU:0")); // device name with "stream:all" is collected by Device Tracer. +#ifndef TENSORFLOW_USE_ROCM + // ROCm platform does not yet support stream level tracing EXPECT_TRUE(HasSubstr(profile_proto_str, "stream:all")); +#endif } // "/host:CPU" is collected by TraceMe EXPECT_TRUE(HasSubstr(profile_proto_str, "/host:CPU")); diff --git a/tensorflow/core/kernels/conv_ops_test.cc b/tensorflow/core/kernels/conv_ops_test.cc index ab338a2550c..0ccdd17491a 100644 --- a/tensorflow/core/kernels/conv_ops_test.cc +++ b/tensorflow/core/kernels/conv_ops_test.cc @@ -1001,6 +1001,10 @@ class FusedConv2DWithBatchNormOpTest : public FusedConv2DOpTest {}; TYPED_TEST_SUITE_P(FusedConv2DWithBiasOpTest); TYPED_TEST_SUITE_P(FusedConv2DWithBatchNormOpTest); +// ROCm does not yet support the _FusedConv2D op, +// Therefore disable tests that check _FusedConv2D, when building with ROCm + +#ifndef TENSORFLOW_USE_ROCM // -------------------------------------------------------------------------- // // Conv2D + BiasAdd + {Activation} // // -------------------------------------------------------------------------- // @@ -1165,4 +1169,5 @@ using FusedBatchNormDataTypes = ::testing::Types; INSTANTIATE_TYPED_TEST_SUITE_P(Test, FusedConv2DWithBatchNormOpTest, FusedBatchNormDataTypes); +#endif // TENSORFLOW_USE_ROCM } // namespace tensorflow diff --git a/tensorflow/python/kernel_tests/init_ops_test.py b/tensorflow/python/kernel_tests/init_ops_test.py index 1d935ee8123..9032d5a1b63 100644 --- a/tensorflow/python/kernel_tests/init_ops_test.py +++ b/tensorflow/python/kernel_tests/init_ops_test.py @@ -753,6 +753,13 @@ class ConvolutionDeltaOrthogonalInitializerTest(test.TestCase): else: shape = [4, 16, 16, 16, 64] convolution = convolutional.conv3d + + if test.is_built_with_rocm(): + # This subtest triggers a known bug in ROCm runtime code + # The bug has been fixed and will be available in ROCm 2.7 + # Re-enable this test once ROCm 2.7 is released + continue + inputs = random_ops.random_normal(shape, dtype=dtype) inputs_2norm = linalg_ops.norm(inputs) outputs = convolution(