python 기초

cupy util import error

난개발자 2023. 11. 14. 21:51
728x90

opensource를 돌리는 과정에서 "No module named 'cupy.util' " 와 같은 에러가 발생했다.

아래를 참조해보면, cupy 버전이 바뀌면서 생긴 문제같다.

cupy._util로  해당 코드를 바꾸면 동작한다고 한다.

https://stackoverflow.com/questions/66421447/chainer-no-module-named-cupy-util

 

Chainer: No module named 'cupy.util'`

I am getting desperate with Chainer because I'm not able to use it with GPU for about a week now. The error I am getting: RuntimeError: CUDA environment is not correctly set up (see https://github....

stackoverflow.com

 

나의 경우도 아래 코드를 변경하니 에러가 사라졌다.

@cupy.util.memoize(for_each_device=True)

에러가 발생한 코드

 

@cupy._util.memoize(for_each_device=True)

수정 후. 에러가 사라졌다.

728x90