티스토리 뷰
jupyter lab실행시 에러 해결(CUDA:0 not supported by XLA service)
tech_curioso 2020. 3. 5. 03:14jupyter notebook에서 잘 동작하는 간단한 딥러닝 모델을 jupyter lab 상에서
학습(fit, fit_generator)코드를 실행시켰을 때 정상적으로 넘어가지 않고
다음과 같은 에러 메시지가 나타났다.
InvalidArgumentError:
device CUDA:0 not supported by XLA service
while setting up XLA_GPU_JIT device number 0
검색해보니 CUDA_VISIBLE_DEVICES관련해서 학습코드가 할당된 GPU를 선택해주는 명령을 shell상에서 지정해주거나 코드상에서 지정하면 된다고 해결책을 제시하고 있다.
터미널 shell에서 다음과 같이 명령을 입력하면 된다.
$ export CUDA_VISIBLE_DEVICES=0,1,2,3
자신의 GPU숫자에 맞게 번호를 지정하면 된다.
또는 코드에서 os 라이브러리를 이용하여 다음과 같이 지정할 수 있다고 한다.
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0,1,2,3'
역시 마지막 0,1,2,3은 자신의 GPU숫자와 비어있는 GPU를 선택해서 지정하면 된다.
참고한 자료의 링크는 다음과 같다.
https://github.com/keras-team/keras/issues/12393
Error selecting GPU programmatically from jupyter · Issue #12393 · keras-team/keras
I have a multi-GPU machine and am trying to train different models on different GPUs. I'm trying to set the GPU programmatically rather than use env vars, but am running into issues. Here's...
github.com
Tensorflow: device CUDA:0 not supported by XLA service while setting up XLA_GPU_JIT device number 0 – inneka.com
This could be due to your TF-default (i.e. 1st) GPU is running out of memory. If you have multiple GPUs, divert your Python program to run on other GPUs. In TF (suppose using TF-2.0-rc1), set the following: # Specify which GPU(s) to use os.environ["CUDA_VI
inneka.com
'CVML > TensorFlow' 카테고리의 다른 글
원격 서버에 돌리고 있는 텐서보드 로컬에서 보기 (0) | 2024.02.07 |
---|---|
(issue 해결중) m1 맥북프로에 텐서플로우 설치하기 (0) | 2021.03.19 |
Tensorflow 버전 조합(CUDA, cuDNN, NVidia Driver) (0) | 2019.08.18 |
tensoflow eager execution mode 관련 글 링크 (0) | 2019.05.28 |
Tensorboard 사용하기(완전기초) (0) | 2019.05.13 |
- Total
- Today
- Yesterday
- vscode
- opencv
- cura
- Python
- WSL
- Fusion360
- 메이커
- Streamlit
- ubuntu
- Maker
- tensorflow
- fablab
- Stable Diffusion
- docker
- git
- Linux
- 파이썬
- 단축키
- comfyUI
- MicroBit
- Arduino
- ssh
- vvvv
- nodejs
- 3d프린터
- conda
- 한글
- nvidia
- 우분투
- CAD
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |