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

UnicodeEncodeError: 'ascii' codec can't encode characters in position 663-665: ordinal not in range(128) #8278

Open
fuxuelinwudi opened this issue Apr 7, 2024 · 1 comment

Comments

@fuxuelinwudi
Copy link

Description

when i use cupy compile for snn, after one epoch train, i got this problem. how could i fix it ?
my seq length is about 128, does something wrong with this setting?

To Reproduce

File "/root/conda/envs/ess/lib/python3.9/site-packages/torch/_tensor.py", line 488, in backward
    torch.autograd.backward(
  File "/root/conda/envs/ess/lib/python3.9/site-packages/torch/autograd/__init__.py", line 197, in backward
    Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass
  File "/root/conda/envs/ess/lib/python3.9/site-packages/torch/autograd/function.py", line 267, in apply
    return user_fn(self, *args)
  File "/root/conda/envs/ess/lib/python3.9/site-packages/spikingjelly/clock_driven/neuron_kernel.py", line 2676, in backward
    kernel(
  File "cupy/_core/raw.pyx", line 93, in cupy._core.raw.RawKernel.__call__
  File "cupy/_core/raw.pyx", line 100, in cupy._core.raw.RawKernel.kernel.__get__
  File "cupy/_core/raw.pyx", line 117, in cupy._core.raw.RawKernel._kernel
  File "cupy/_util.pyx", line 64, in cupy._util.memoize.decorator.ret
  File "cupy/_core/raw.pyx", line 538, in cupy._core.raw._get_raw_module
  File "cupy/_core/core.pyx", line 2236, in cupy._core.core.compile_with_cache
  File "cupy/_core/core.pyx", line 2254, in cupy._core.core.compile_with_cache
  File "/root/conda/envs/ess/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 484, in _compile_module_with_cache
    return _compile_with_cache_cuda(
  File "/root/conda/envs/ess/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 562, in _compile_with_cache_cuda
    ptx, mapping = compile_using_nvrtc(
  File "/root/conda/envs/ess/lib/python3.9/site-packages/cupy/cuda/compiler.py", line 317, in compile_using_nvrtc
    cu_file.write(source)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 663-665: ordinal not in range(128)

Installation

None

Environment

# Paste the output here

Additional Information

No response

@fuxuelinwudi fuxuelinwudi added the cat:bug Bugs label Apr 7, 2024
@leofang
Copy link
Member

leofang commented Apr 7, 2024

  File "/root/conda/envs/ess/lib/python3.9/site-packages/spikingjelly/clock_driven/neuron_kernel.py", line 2676, in backward
    kernel(

It seems this is the package that contains non-ascii characters in the kernel code. I'd suggest to reach out to the maintainers. The offending code is not coming from CuPy.

@leofang leofang added issue-checked and removed cat:bug Bugs labels Apr 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants