Skip to content

Commit 96da98b

Browse files
authored
[docs] Add "Enable Quicker Builds" section to development.md (#4074)
1 parent 602d068 commit 96da98b

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

docs/development.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,17 +76,33 @@ We recommend linting and formatting your commits _before_ the CI has a chance to
7676

7777
### With CMake
7878

79+
#### (Optional) Enable Quicker Builds
80+
81+
For workflows that demand frequent rebuilds, the following steps will allow you to specify the relevant options during configuration.
82+
83+
##### On Ubuntu
84+
85+
Install [Clang](https://clang.llvm.org/index.html), [ccache](https://ccache.dev/), and [LLD](https://lld.llvm.org/)
86+
87+
```shell
88+
sudo apt install clang ccache lld
89+
```
90+
91+
##### On Windows
92+
93+
1. Set up Developer PowerShell [for Visual Studio](https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022#start-in-visual-studio)
94+
1. Ensure that the compiler and linker binaries are in the `PATH` variable.
95+
7996
#### Configure for Building...
8097

8198
Two setups are possible to build: in-tree and out-of-tree. The in-tree setup is the most straightforward, as it will build LLVM dependencies as well.
8299

83100
##### ...with LLVM "in-tree" using...
84101

85-
The following commands generate configuration files to build the project *in-tree*, that is, using llvm/llvm-project as the main build. This will build LLVM as well as torch-mlir and its subprojects. On Windows, use the "Developer PowerShell for Visual Studio" to ensure that the compiler and linker binaries are in the `PATH` variable.
102+
The following commands generate configuration files to build the project *in-tree*, that is, using llvm/llvm-project as the main build. This will build LLVM as well as torch-mlir and its subprojects.
86103

87104
###### ...Base + Optimization Options
88-
89-
This requires `lld`, `clang`, `ccache`, and other dependencies for building `libtorch` / `PyTorch` wheels from source. If you run into issues because of these, try the [simplified build command](#base-options).
105+
This will build `libtorch` / `PyTorch` wheels from source and requires [the enablement mentioned earlier](#optional-enable-quicker-builds). If you encounter issues when you run this, try the [simplified build command](#base-options) instead.
90106

91107
```shell
92108
cmake -GNinja -Bbuild \

0 commit comments

Comments
 (0)