From 9a11178ce1a3ba43da3f20a0dbe88e6a66735dff Mon Sep 17 00:00:00 2001 From: Justin Lebar Date: Sat, 19 May 2018 00:37:18 -0700 Subject: [PATCH] [XLA] Consistently apply gpu-max-kernel-unroll-factor = 1 in HloTestBase. Previously we set it in CreateNewModule but not in GetDebugOptionsFromFlags(), which seems wrong. PiperOrigin-RevId: 197247863 --- tensorflow/compiler/xla/tests/hlo_test_base.cc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tensorflow/compiler/xla/tests/hlo_test_base.cc b/tensorflow/compiler/xla/tests/hlo_test_base.cc index 1259857..d964875 100644 --- a/tensorflow/compiler/xla/tests/hlo_test_base.cc +++ b/tensorflow/compiler/xla/tests/hlo_test_base.cc @@ -95,10 +95,7 @@ HloTestBase::HloTestBase(se::Platform* test_platform, /* static */ std::unique_ptr HloTestBase::CreateNewModule(const string& name) { HloModuleConfig config; - auto debug_options = HloTestBase::GetDebugOptionsForTest(); - debug_options.set_xla_gpu_max_kernel_unroll_factor(1); - config.set_debug_options(debug_options); - + config.set_debug_options(GetDebugOptionsForTest()); return MakeUnique(name, VersionedComputationHandle(), config); } @@ -106,6 +103,7 @@ std::unique_ptr HloTestBase::CreateNewModule(const string& name) { auto debug_options = legacy_flags::GetDebugOptionsFromFlags(); // TODO(b/38354253): Change tests to use Parameters instead of Constants. debug_options.add_xla_disable_hlo_passes("constant_folding"); + debug_options.set_xla_gpu_max_kernel_unroll_factor(1); return debug_options; } -- 2.7.4