[코드 이모저모] Jax Device print error

2024. 7. 16. 23:53Code/코드 이모저모

import jax
print(jax.devices())

위 코드를 실행하면 아래와 같은 에러가 나왔음.

WARNING: Logging before InitGoogle() is written to STDERR
I0000 00:00:1721141137.213010    8925 singleton_tpu_states_manager.cc:45] TpuStatesManager::GetOrCreate(): no tpu system exists. Creating a new tpu system.
F0000 00:00:1721141137.223216    8925 b295d63588a.cc:1205] File: InitGoogle() has not finished yet.  See gl_________________________58    Initializers running: {  }   Stack trace:
    @     0x7f8ce340e8ae  (unknown)
    @     0x7f8ce30290d6  (unknown)
    @     0x7f8ce3028077  (unknown)
    @     0x7f8ce303773b  (unknown)
    @     0x7f8ce30360d2  (unknown)
    @     0x7f8ce243b0f9  (unknown)
    @     0x7f8ce24382ba  (unknown)
    @     0x7f8ce243e5a8  (unknown)
    @     0x7f8ce2434971  (unknown)
    @     0x7f8ce24343c2  (unknown)
    @     0x7f8ce2425437  (unknown)
    @     0x7f8ce340640f  (unknown)
    @     0x7f8ce243422b  (unknown)
    @     0x7f8ce1beb659  (unknown)
    @     0x7f8cdc55ccf4  (unknown)
    @     0x7f8cdc55ccb7  (unknown)
    @     0x7f8cdbcd7469  (unknown)
    @     0x7f8cdbcc6952  (unknown)
    @     0x7f8cdbc70f5f  (unknown)
    @     0x7f8cdb0feb2e  (unknown)
    @     0x7f8d0084fa59  xla::GetCApiClient()
    @     0x7f8d004c5ad5  pybind11::cpp_function::initialize<>()::{lambda()#3}::_FUN()
    @     0x7f8d0049ccbf  pybind11::cpp_function::dispatcher()
    @           0x5d5499  PyCFunction_Call
*** Check failure stack trace: ***
    @     0x7f8ce3468484  (unknown)
    @     0x7f8ce3467fc2  (unknown)
    @     0x7f8ce363c62e  (unknown)
    @     0x7f8ce340e9a0  (unknown)
    @     0x7f8ce30290d6  (unknown)
    @     0x7f8ce3028077  (unknown)
    @     0x7f8ce303773b  (unknown)
    @     0x7f8ce30360d2  (unknown)
    @     0x7f8ce243b0f9  (unknown)
    @     0x7f8ce24382ba  (unknown)
    @     0x7f8ce243e5a8  (unknown)
    @     0x7f8ce2434971  (unknown)
    @     0x7f8ce24343c2  (unknown)
    @     0x7f8ce2425437  (unknown)
    @     0x7f8ce340640f  (unknown)
    @     0x7f8ce243422b  (unknown)
    @     0x7f8ce1beb659  (unknown)
    @     0x7f8cdc55ccf4  (unknown)
    @     0x7f8cdc55ccb7  (unknown)
    @     0x7f8cdbcd7469  (unknown)
    @     0x7f8cdbcc6952  (unknown)
    @     0x7f8cdbc70f5f  (unknown)
    @     0x7f8cdb0feb2e  (unknown)
    @     0x7f8d0084fa59  xla::GetCApiClient()
    @     0x7f8d004c5ad5  pybind11::cpp_function::initialize<>()::{lambda()#3}::_FUN()
    @     0x7f8d0049ccbf  pybind11::cpp_function::dispatcher()
    @           0x5d5499  PyCFunction_Call
Aborted (core dumped)

 

이는 "libtpu-nightly"를 설치했기 때문 [해당 library는 TPU 전용]

필자는 GPU만 사용하기 때문에 해당 library를 삭제 후 오류 해결

pip uninstall libtpu-nightly

 

'Code > 코드 이모저모' 카테고리의 다른 글

[코드 이모저모] Flax library -1  (0) 2024.07.23