mirror of
https://github.com/zebrajr/tensorflow.git
synced 2026-01-15 12:15:41 +00:00
Use StartDetachedThread instead of SchedClosure to dispatch atom program compilation
PiperOrigin-RevId: 847528854
This commit is contained in:
committed by
TensorFlower Gardener
parent
ce61030c67
commit
7733c4c03d
@@ -180,7 +180,8 @@ absl::StatusOr<CompileFuture> MultiThreadedAtomProgramCompiler::CompileXla(
|
||||
/*context=*/nullptr, // Shares the same long-living context.
|
||||
mlir::OwningOpRef<mlir::ModuleOp>(module_op.clone()));
|
||||
auto [promise, future] = CompileFuture::MakePromise();
|
||||
tsl::Env::Default()->SchedClosure(
|
||||
tsl::Env::Default()->StartDetachedThread(
|
||||
tsl::ThreadOptions(), /*name=*/"MultiThreadedAtomProgramCompiler",
|
||||
WithCurrentUserContext([this, hlo_program = std::move(hlo_program),
|
||||
compile_options = std::move(compile_options),
|
||||
promise = std::move(promise)]() mutable {
|
||||
|
||||
Reference in New Issue
Block a user