hidet.driver
hidet.driver¶
Functions:
|
Build a task into a compiled function. |
|
Build a batch of ir modules. |
- hidet.driver.build_task(task, target_device='cuda', load=True)[source]¶
Build a task into a compiled function.
- Parameters
task (Task) – The task to be built.
target_device (str) – The target device. Candidates are ‘cuda’ and ‘cpu’.
load (bool) – Whether to load the compiled function. If False, the compiled function will not be loaded, and None is returned. Otherwise, the compiled function is loaded and returned.
- Returns
When load is True, the compiled function is returned. Otherwise, None is returned.
- Return type
compiled_func
- hidet.driver.build_ir_module_batch(ir_modules, output_dir, parallel=True, verbose=False)[source]¶
Build a batch of ir modules.
- Parameters
ir_modules (Sequence[IRModule]) – A sequence of ir modules to build.
output_dir (str) – The output directory to save the compiled library and source code (lib.so and source.cu).
parallel (bool) – Whether build in parallel. Default True.
verbose (bool) – Whether show the progress and summary. Default False.
- Returns
The compiled functions, in the same order as build_instances. When the build for a build instance failed, None for that instance is returned.
- Return type
funcs