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

Make the XLA_FLAGS=--xla_gpu_asm_extra_flags works with replay_computation #40581

Merged
merged 2 commits into from
Jul 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 7 additions & 1 deletion tensorflow/compiler/xla/tools/replay_computation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,14 @@ StatusOr<Literal> ReplayComputation(const HloSnapshot& module,
if (opts.use_fake_data) {
// Run fake computations with debug options ignoring XLA_FLAGS. Users very
// likely want XLA_FLAGS only to apply to the "real" computation being run,
// not to the fake computations we use for generating arguments.
// not to the fake computations we use for generating arguments. There is
// an exception. ptxas can be called during the generation of fake
// data. As it is cached in the process memory, the flag affecting this call
// should not be ignored.
auto debug_opts_flags = GetDebugOptionsFromFlags();
auto debug_opts = DefaultDebugOptionsIgnoringFlags();
debug_opts.set_xla_gpu_asm_extra_flags(debug_opts_flags.xla_gpu_asm_extra_flags());

global_data_arguments =
MakeFakeArgumentsOrDie(computation, client, &debug_opts);
for (const auto& data : global_data_arguments) {
Expand Down