Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove GPU check in Executor #1674

Merged
merged 2 commits into from
Jan 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 0 additions & 11 deletions jina/executors/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,6 @@ def __init__(self, *args, **kwargs):
self._drivers = {} # type: Dict[str, List['BaseDriver']]
self._attached_pea = None

def _check_on_gpu(self):
if self.on_gpu:
try:
cuda_version = subprocess.check_output(['nvcc', '--version']).decode()
self.logger.success(f'CUDA compiler version: {cuda_version}')
except OSError:
self.logger.warning(
'on_gpu=True, but you dont have CUDA compatible GPU, i will reset on_gpu=False ')
self.on_gpu = False

def _post_init_wrapper(self, _metas: Dict = None, _requests: Dict = None, fill_in_metas: bool = True) -> None:
with TimeContext('post_init may take some time', self.logger):
if fill_in_metas:
Expand All @@ -149,7 +139,6 @@ def _post_init_wrapper(self, _metas: Dict = None, _requests: Dict = None, fill_i
self._fill_metas(_metas)
self._fill_requests(_requests)

self._check_on_gpu()
_before = set(list(vars(self).keys()))
self.post_init()
self._post_init_vars = {k for k in vars(self) if k not in _before}
Expand Down