blob: da37508cce104e19b53357efd584a924eb77f36c [file] [log] [blame]
from . import CWrapPlugin
class AutoGPU(CWrapPlugin):
def __init__(self, has_self=True, condition=None):
self.has_self = has_self
self.condition = condition
def process_pre_arg_assign(self, template, option):
if not option.get('auto_gpu', True):
return template
call = 'AutoGPU auto_gpu(get_device(args));'
return [call] + template