def _GetDefaultConfigProto(): config_proto = job_set_util.ConfigProto() config_proto.resource.machine_num = 0 config_proto.resource.gpu_device_num = 1 config_proto.io_conf.data_fs_conf.localfs_conf.SetInParent() config_proto.io_conf.snapshot_fs_conf.localfs_conf.SetInParent() return config_proto
def _GetDefaultConfigProto(): config_proto = job_set_util.ConfigProto() config_proto.resource.machine_num = 0 if oneflow._oneflow_internal.flags.with_cuda(): config_proto.resource.gpu_device_num = 1 else: config_proto.resource.cpu_device_num = 1 config_proto.resource.gpu_device_num = 0 config_proto.session_id = session_ctx.GetDefaultSession().id return config_proto
def _GetDefaultConfigProto(): config_proto = job_set_util.ConfigProto() config_proto.resource.machine_num = 0 if oneflow_api.flags.with_cuda(): config_proto.resource.gpu_device_num = 1 else: config_proto.resource.cpu_device_num = 1 config_proto.resource.gpu_device_num = 0 config_proto.io_conf.data_fs_conf.localfs_conf.SetInParent() config_proto.io_conf.snapshot_fs_conf.localfs_conf.SetInParent() config_proto.session_id = session_ctx.GetDefaultSession().id return config_proto
def _GetDefaultConfigProto(): from oneflow.python.compatibility import with_cuda config_proto = job_set_util.ConfigProto() config_proto.resource.machine_num = 0 if with_cuda: config_proto.resource.gpu_device_num = 1 else: config_proto.resource.cpu_device_num = 1 config_proto.resource.gpu_device_num = 0 config_proto.io_conf.data_fs_conf.localfs_conf.SetInParent() config_proto.io_conf.snapshot_fs_conf.localfs_conf.SetInParent() return config_proto
def _make_config_proto(self): if self.config_proto_ is None: config_proto = job_set_util.ConfigProto() config_proto.resource.SetInParent() config_proto.session_id = 0 self.config_proto_ = config_proto # self.config_proto_ = session_util._GetDefaultConfigProto() if self.option_.device_tag == "gpu": self.config_proto_.resource.gpu_device_num = self.option_.device_num elif self.option_.device_tag == "cpu": self.config_proto_.resource.cpu_device_num = self.option_.device_num self.config_proto_.resource.gpu_device_num = 0 else: raise NotImplementedError("not supported device tag {}".format( self.option_.device_tag)) self.config_proto_.resource.enable_legacy_model_io = True
def _make_config_proto(self): config_proto = job_set_util.ConfigProto() config_proto.resource.SetInParent() config_proto.session_id = self.id return config_proto