tvm_tirx.testing.run_with_gpu_lock#
- tvm_tirx.testing.run_with_gpu_lock(func, /, *args, **kwargs)#
Run a callable while holding the machine-local GPU lock.
The lock avoids contentious GPU access that may break GPU-related tests.
- Parameters:
func (Callable) – Callable containing the complete live local-GPU lifetime.
*args (Any) – Positional arguments forwarded to
func.**kwargs (Any) – Keyword arguments forwarded to
func.
- Returns:
result (Any) – The return value of
func.- Return type:
_R