| 60 | } |
| 61 | |
| 62 | Maybe<Scope> MakeInitialScope(const JobConfigProto& job_conf, Symbol<ParallelDesc> placement, |
| 63 | bool is_local) { |
| 64 | std::shared_ptr<Scope> scope; |
| 65 | JUST(PhysicalRun([&scope, &job_conf, placement, |
| 66 | is_local](InstructionsBuilder* builder) -> Maybe<void> { |
| 67 | int64_t session_id = JUST(GetDefaultSessionId()); |
| 68 | scope = |
| 69 | JUST(builder->BuildInitialScopeWithPlacement(session_id, job_conf, placement, is_local)); |
| 70 | return Maybe<void>::Ok(); |
| 71 | })); |
| 72 | return scope; |
| 73 | } |
| 74 | |
| 75 | Maybe<Scope> GetCurrentScope() { |
| 76 | auto* scope_stack = ThreadLocalScopeStack(); |
no test coverage detected