Skip to content

CUDAをつかっているとき、PCをレジュームしたあと漢字変換ができなくなる #191

@ShikiOkasaka

Description

@ShikiOkasaka

レジューム後、さいしょに漢字変換をするときに、つぎのような例外が発生する。

2024-10-29 12:20:47,578:ERROR:__main__:crashed:
Traceback (most recent call last):
  File "/usr/share/ibus-hiragana/engine/engine.py", line 1546, in do_process_key_event
    return self._controller.process_key_event(self, keyval, keycode, state)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/ibus-hiragana/engine/event.py", line 370, in process_key_event
    processed = engine.process_key_event(event)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/ibus-hiragana/engine/engine.py", line 1412, in process_key_event
    result = self._process_surrounding_text(e)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/ibus-hiragana/engine/engine.py", line 996, in _process_surrounding_text
    return self._process_replace(e)
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/ibus-hiragana/engine/engine.py", line 904, in _process_replace
    cand, size = self._assisted_lookup_dictionary(text, pos)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/ibus-hiragana/engine/engine.py", line 786, in _assisted_lookup_dictionary
    cand, cursor_pos = self._dict.assisted_lookup(self._model, plain, pos, anchor)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/ibus-hiragana/engine/dictionary.py", line 543, in assisted_lookup
    p_dict = model.assist(text[:pos - len(self._yomi)], self._yomi, self._cand)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/ibus-hiragana/engine/llm.py", line 266, in assist
    'input_ids': torch.tensor(truncated).unsqueeze(0).to(self._device)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: unspecified launch failure
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

OS: Ubuntu 24.04.1 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions