-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm] Cache llvm runtime bitcode to reduce start up time in dev mode (…
…#1144) * [llvm] cache llvm runtime bitcode to reduce start up time in dev mode * add TI_CACHE_RUNTIME_BITCODE env cfg * [skip ci] revert * [skip ci] enforce code format * [skip ci] Apply suggestions from code review Co-authored-by: Yuanming Hu <yuanming-hu@users.noreply.github.com> Co-authored-by: Taichi Gardener <taichigardener@gmail.com> Co-authored-by: Yuanming Hu <yuanming-hu@users.noreply.github.com>
- Loading branch information
1 parent
e1c0336
commit a345d5b
Showing
2 changed files
with
64 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,35 @@ | ||
Global settings | ||
--------------- | ||
|
||
- Disable advanced optimization to save compile time: ``ti.core.toggle_advanced_optimization(False)`` | ||
- Restart the Taichi runtime system (clear memory, destroy all variables and kernels): ``ti.reset()`` | ||
- Eliminate verbose outputs: ``ti.get_runtime().set_verbose(False)`` | ||
- To not trigger GDB when crashes: ``export TI_GDB_TRIGGER=0`` | ||
- To not use unified memory for CUDA: ``export TI_USE_UNIFIED_MEMORY=0`` | ||
- To specify pre-allocated memory size for CUDA: ``export TI_DEVICE_MEMORY_GB=0.5`` | ||
- Show more detailed log (TI_TRACE): ``export TI_LOG_LEVEL=trace`` | ||
- To specify which GPU to use for CUDA: ``export CUDA_VISIBLE_DEVICES=[gpuid]`` | ||
- To specify which Arch to use: ``export TI_ARCH=cuda`` | ||
- To print intermediate IR generated: ``export TI_PRINT_IR=1`` | ||
- To print verbose details: ``export TI_VERBOSE=1`` | ||
Backends | ||
******** | ||
|
||
- To specify which Arch to use: ``export TI_ARCH=cuda`` or ``ti.init(arch=ti.cuda)``. | ||
- To specify which GPU to use for CUDA: ``export CUDA_VISIBLE_DEVICES=[gpuid]``. | ||
- To specify pre-allocated memory size for CUDA: ``export TI_DEVICE_MEMORY_GB=0.5`` or ``ti.init(device_memory_GB=0.5)``. | ||
- To disable unified memory usage on CUDA: ``export TI_USE_UNIFIED_MEMORY=0``. | ||
|
||
Compilation | ||
*********** | ||
|
||
- Disable advanced optimization to save compile time & possible erros: ``ti.core.toggle_advanced_optimization(False)``. | ||
- To print intermediate IR generated: ``export TI_PRINT_IR=1`` or ``ti.init(print_ir=True)``. | ||
- To print preprocessed Python code: ``export TI_PRINT_PREPROCESSED=1`` or ``ti.init(print_preprocessed=True)``.. | ||
|
||
Runtime | ||
******* | ||
|
||
- Restart the entire Taichi system (destroy all tensors and kernels): ``ti.reset()``. | ||
- To start program in debug mode: ``export TI_DEBUG=1`` or ``ti.init(debug=True)``. | ||
|
||
Logging | ||
******* | ||
|
||
- Show more detailed log to level TRACE: ``export TI_LOG_LEVEL=trace`` or ``ti.set_logging_level(ti.TRACE)``. | ||
- Eliminate verbose outputs: ``ti.get_runtime().set_verbose(False)`` or ``TI_VERBOSE=0``. | ||
|
||
Develop | ||
******* | ||
|
||
- Cache compiled runtime bitcode in **dev mode** to save start up time: ``export TI_CACHE_RUNTIME_BITCODE=1``. | ||
- To trigger GDB when Taichi crashes: ``export TI_GDB_TRIGGER=1``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters