File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -2715,17 +2715,18 @@ struct LinkableRuntime {
2715
2715
auto mpi = getenv (" OMPI_COMM_WORLD_RANK" );
2716
2716
device = 0 ;
2717
2717
if (mpi) {
2718
- llvm::errs () << " mpi : " << mpi << " \n " ;
2719
2718
device = atoi (mpi);
2720
- } else
2721
- llvm::errs () << " mpi: null \n " ;
2719
+ }
2720
+
2722
2721
client = nullptr ;
2723
2722
2724
2723
if (backend == " xla-tpu" ) {
2725
2724
if (device == 0 ) {
2726
2725
client = MakeTPUClient (nullptr , &error);
2727
- if (error)
2726
+ if (error) {
2728
2727
llvm::errs () << " error: " << error << " \n " ;
2728
+ exit (1 );
2729
+ }
2729
2730
}
2730
2731
} else if (backend == " xla-gpu" ) {
2731
2732
int node_id = 0 ;
@@ -2740,8 +2741,10 @@ struct LinkableRuntime {
2740
2741
client = MakeGPUClient (node_id, num_nodes, allowed_devices,
2741
2742
num_allowed_devices, mem_fraction, gpu_preallocate,
2742
2743
platform, &refstr, distributed_runtime_client);
2743
- if (!client)
2744
+ if (!client) {
2744
2745
llvm::errs () << " error: " << refstr << " \n " ;
2746
+ exit (1 );
2747
+ }
2745
2748
assert (client);
2746
2749
// Weird stream issue in freeing cuda client.
2747
2750
shouldFreeClient = false ;
You can’t perform that action at this time.
0 commit comments