Commandline Options
The Daisytuner Optimizing Compiler Collection (docc) is based on CLang/LLVM, so most options of them are inherited. Due the features docc uses to plug into LLVM’s handling, some options may interfere with the operation of docc. Currently, docc will pick relevant parts of the original source code to handle itself, partially outside of LLVMs control before reintegrating its further optimized results.
For this, new source code files may be generated during link-time that contain that code. This link-time generated code can have other build options then the original source code. Docc generally manages the build options such that the code can interoperate with each other.
Environment options
DOCC_TMP: points to a place, where docc will put its intermediate outputs. Defaults to/tmp/[$USER]/DOCC. During normal operation, docc will remove its intermediate outputs after its done, similar to other compilers.
Docc optimization options
-docc-tune=...
Chooses a target for which to optimize for
- Default:
none - Options:
sequentialopenmp: Parallelize to multiple CPU cores using OpenMPcuda: Offload to Nvidia Cuda accelerators & GPUstenstorrent: Offload to Tenstorrent Wormhole and Blackhole accelerator cards
-docc-offloading-force-synchronous
For supporting offloading backends, use synchronous kernel calls instead of asynchronous kernel calls. Makes host profiling include any processing time on the offloaded device at the cost of performance. Without it, host-to-device and device-to-host transfer time measurements may be meaningless as they happen in the background.
-docc-no-offloading-transfer-opt
Disable any attempts at removing unneccesary transfers between host and offloaded device. The optimization can save significant amounts of time, but may hide bugs as the transfers may no longer happen near the code working on the data.
-docc-transfer-tune
Enable transfer tuning, which queries our cloud database for possible optimizations to further optimize the results. Access requires a valid registration/licensing of your device. Level of access to transfer tune different optimization targets etc. may depend on the linked account.
-docc-func-blacklist=...
Sets a regular expression for functions to not optimize beyond CLang’s normal handling. Helpful when setting experimental options that only work for some parts of the code. Works on the final symbol-names (mangled names for C++).
- Example: ’.*blacklisted_function.*‘
-docc-lower-invoke
Removes any exception handling code. Such exception handling code may be too complex to be offloaded or constrain the code too much to further optimize it.
Docc handling options
-docc-work-dir=...
Sets a specific output directory for the intermediary files, instead of generating a unique directory underneath the DOCC_TMP directory.
Implies -docc-save-temps.
-docc-save-temps
Stops docc from deleting its intermediate output directory.
-docc-comp-opt=...
Allows setting compile options for newly generated code manually. Can be repeated however many times needed.
When set during compile time of a code unit, it is inherited into any code generated from this original code unit.
When set during link time, it takes precedence over all other manually set options of the different code units.
Most commonly used to build generated code with debug information -docc-comp-opt=-g. As this debug information would point to less readable, machine-generated source code in temporary files and not the original source files, it does not apply the main -g flag by default.
Docc plugins
-docc-plugins=...
Comma-separated list of docc plugins. Each plugin can add domain- or application-specific knowledge to be used for further optimization. This may include entire replacements of functions with code better suited to offloading or using different data representations.
See Docc Plugins
Instrumentation
-docc-instrument=...
Enables instrumentation of generated code, that will measure performance data at runtime.
- Default:
none - Options:
ols: instruments only the outermost code in each generated code.
See Docc instrumentation for details on how to run instrumented code and control its measurements and outputs.