Commit 3d5ece6
committed
Add Hermetic C++ Toolchains for XLA project.
Hermetic C++/CUDA toolchains are enabled for Linux x86_64 platform by default. List of covered OSs will be extended in a few closest months. Developers still could use non hermetic toolchains with help of --config=clang_local flag.
Example 1: Run CPU tests
The following command with env variables CC, CXX was used
bazel test --build_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd --test_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd \
--repo_env=CC=/usr/lib/llvm-18/bin/clang \
--repo_env=CXX=/usr/lib/llvm-18/bin/clang++ \
-- //xla/... //build_tools/... @tsl//tsl/...
After, for hermetic build we use command without env variables CC and CXX
bazel test --build_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd --test_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd \
-- //xla/... //build_tools/... @tsl//tsl/...
For non-hermetic build we use command with flag "--config=clang_local" and env variables CC, CXX
bazel test --build_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd --test_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd \
--config=clang_local \
--repo_env=CC=/usr/lib/llvm-18/bin/clang \
--repo_env=CXX=/usr/lib/llvm-18/bin/clang++ \
-- //xla/... //build_tools/... @tsl//tsl/...
Example 2: Run CPU tests for x86_64 architecture with remote execution
The following command was used
bazel test --build_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd --test_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd \
--config=rbe_linux_cpu \
-- //xla/... //build_tools/... @tsl//tsl/...
After, for hermetic build we use the same command.
For non-hermetic remote builds we temporarily add config rbe_linux_cpu_clang_local with deprecated parameters
bazel test --build_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd --test_tag_filters=-no_oss,-gpu,-requires-gpu-nvidia,-requires-gpu-amd \
--config=rbe_linux_cpu_clang_local \
-- //xla/... //build_tools/... @tsl//tsl/...
We don't support other "rbe_*_clang_local" configuration flags, and you could construct your own combinations.
PiperOrigin-RevId: 7725303811 parent f0939ff commit 3d5ece6
4 files changed
Lines changed: 51 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | | - | |
| 8 | + | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
| 115 | + | |
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
434 | 434 | | |
435 | 435 | | |
436 | 436 | | |
437 | | - | |
438 | 437 | | |
439 | 438 | | |
440 | 439 | | |
| |||
458 | 457 | | |
459 | 458 | | |
460 | 459 | | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | 460 | | |
467 | 461 | | |
468 | 462 | | |
| |||
478 | 472 | | |
479 | 473 | | |
480 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
481 | 485 | | |
482 | 486 | | |
483 | 487 | | |
| |||
498 | 502 | | |
499 | 503 | | |
500 | 504 | | |
| 505 | + | |
501 | 506 | | |
| 507 | + | |
502 | 508 | | |
503 | 509 | | |
504 | 510 | | |
| |||
514 | 520 | | |
515 | 521 | | |
516 | 522 | | |
| 523 | + | |
517 | 524 | | |
518 | 525 | | |
519 | 526 | | |
| |||
539 | 546 | | |
540 | 547 | | |
541 | 548 | | |
| 549 | + | |
542 | 550 | | |
543 | 551 | | |
544 | 552 | | |
| |||
591 | 599 | | |
592 | 600 | | |
593 | 601 | | |
| 602 | + | |
594 | 603 | | |
595 | 604 | | |
596 | 605 | | |
597 | 606 | | |
598 | 607 | | |
| 608 | + | |
599 | 609 | | |
600 | 610 | | |
601 | 611 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
132 | 143 | | |
133 | 144 | | |
134 | 145 | | |
| |||
0 commit comments