Skip to content

Commit

Permalink
Provide a runtime option to lower bound the number of batch threads.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 626118642
  • Loading branch information
deqiangc authored and tensorflow-copybara committed Apr 18, 2024
1 parent 2235e43 commit 50b07e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ absl::Status TfrtSavedModelFactory::CreateTfrtSavedModelWithMetadata(
ToTpuAllowUnpaddedBatch(config_.tpu_unpadded_batch_mode());
compile_options.use_gpu_compile_and_execute_op =
config_.tfrt_use_fused_gpu_op();
compile_options.min_num_batch_threads = config_.tfrt_min_num_batch_threads();

options.graph_execution_options.run_placer_grappler_on_functions =
config_.run_placer_grappler_on_functions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ message TfrtSavedModelConfig {

// Whether to use fused op for GPU compile, execute and data transfer.
bool tfrt_use_fused_gpu_op = 2018;

// The minimum number of batch threads.
int64 tfrt_min_num_batch_threads = 2019;
}

// Config proto for TfrtSavedModelSourceAdapter.
Expand Down

0 comments on commit 50b07e4

Please sign in to comment.