TaskMiner is a source-to-source compiler that exposes task parallelism in programs written in C. It does so by annotating C programs with task-based OpenMP pragmas. TaskMiner is implemented in LLVM 3.7. Find more information in our paper "Automatic Identification of Tasks in Structured Programs", or in this video, or in these slides. The code of TaskMiner is available in git. To try it out, simply paste a program into the box below, and click 'Annotate'. You will get the annotated program inside the box 'Annotated Code'. We only annotate complete programs. If you have part of a function, with missing definitions, complete it first using psyche-c.
To assess a potential Task's viability, TaskMiner uses information
about the OpenMP runtime and the underlying architecture, such as:
- Number of Threads:
If set to 0, this constant is the function omp_get_num_threads(), which according to the OpenMP specification, returns the number of cores by default.
- Runtime Cost:
this constant approximates the work that the OpenMP runtime spends for maintaining and dispatching a single task. It is measured in terms of assembly instructions.
- Threshold:
the granularity of tasks, in terms of instructions. This constant constrols how conservative TaskMiner is. The perfect Runtime would allow a task to be exactly equals to the cost of maintaining it. To this Runtime, the minimum Threshold for our tasks to be dispatched would be 1.
- Recursion Pruning:
This parameter controls the depth at which tasks will be final, which means that no new tasks will be dispatched from that point on. Sometimes it is not desirable to have too many levels of nested parallelism.