[GH-ISSUE #971] Tesla P100一直跑不起来,能成功加载模型到出现chat的界面,但是一提交prompt就报错。torch,vision,audio是本地编译的,有指定架构,全部都单独测试过没问题。是ktransformers这边需要配… #688

Open
opened 2026-10-29 14:42:55 +00:00 by bsakaguchi · 4 comments
Owner

Originally created by @2203476 on GitHub (Mar 24, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/971

Originally created by @2203476 on GitHub (Mar 24, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/971
Author
Owner

@blime4 commented on GitHub (Mar 25, 2025):

You can provide the error log

<!-- gh-comment-id:2749817151 --> @blime4 commented on GitHub (Mar 25, 2025): You can provide the error log
Author
Owner

@2203476 commented on GitHub (Mar 25, 2025):

You can provide the error log

Here is the error log:
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py", line 185, in
fire.Fire(local_chat)
File "/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py", line 135, in Fire
component_trace = _Fire(component, args, parsed_flag_args, context, name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py", line 468, in _Fire
component, remaining_args = _CallAndUpdateTrace(
^^^^^^^^^^^^^^^^^^^^
File "/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py", line 684, in _CallAndUpdateTrace
component = fn(*varargs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py", line 179, in local_chat
generated = prefill_and_generate(
^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py", line 208, in prefill_and_generate
logits = chunk_prefill(inputs[:, chunk_start:chunk_end], cache_position[chunk_start:chunk_end], past_key_values)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py", line 165, in chunk_prefill
logits = model(
^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py", line 1688, in forward
outputs = self.model(
^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/operators/models.py", line 729, in forward
layer_outputs = decoder_layer(
^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py", line 1205, in forward
hidden_states, self_attn_weights, present_key_value = self.self_attn(
^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py", line 599, in forward
return self.forward_windows(
^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py", line 539, in forward_windows
return self.forward_chunck(
^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py", line 90, in forward_chunck
q = self.q_b_proj(self.q_a_layernorm(self.q_a_proj(hidden_states)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py", line 105, in forward
hidden_states = hidden_states.to(torch.float32)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: CUDA error: invalid device function
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.

(torchenv) tg@tg-Super-Server:$ echo $TORCH_USE_CUDA_DSA && echo $CUDA_LAUNCH_BLOCKING && echo $PYTORCH_USE_CUDA_DSA
1
1
1
(torchenv) tg@tg-Super-Server:$

<!-- gh-comment-id:2749891474 --> @2203476 commented on GitHub (Mar 25, 2025): > You can provide the error log Here is the error log: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py", line 185, in fire.Fire(local_chat) File "/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py", line 135, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py", line 468, in _Fire component, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^ File "/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py", line 684, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py", line 179, in local_chat generated = prefill_and_generate( ^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py", line 208, in prefill_and_generate logits = chunk_prefill(inputs[:, chunk_start:chunk_end], cache_position[chunk_start:chunk_end], past_key_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py", line 165, in chunk_prefill logits = model( ^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py", line 1688, in forward outputs = self.model( ^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/operators/models.py", line 729, in forward layer_outputs = decoder_layer( ^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py", line 1205, in forward hidden_states, self_attn_weights, present_key_value = self.self_attn( ^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py", line 599, in forward return self.forward_windows( ^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py", line 539, in forward_windows return self.forward_chunck( ^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py", line 90, in forward_chunck q = self.q_b_proj(self.q_a_layernorm(self.q_a_proj(hidden_states))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1739, in _wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py", line 1750, in _call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py", line 105, in forward hidden_states = hidden_states.to(torch.float32) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: CUDA error: invalid device function Compile with TORCH_USE_CUDA_DSA to enable device-side assertions. (torchenv) tg@tg-Super-Server:$ echo $TORCH_USE_CUDA_DSA && echo $CUDA_LAUNCH_BLOCKING && echo $PYTORCH_USE_CUDA_DSA 1 1 1 (torchenv) tg@tg-Super-Server:$
Author
Owner

@annian101 commented on GitHub (Mar 25, 2025):

您可以提供错误日志

这是错误日志: 回溯(最近一次调用最后一次): 文件“”,第 198 行,在 _run_module_as_main 中 文件“”,第 88 行,在 _run_code 中 文件“/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py”,第 185 行,在 fire.Fire(local_chat) 中 文件“/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py”,第 135 行,在 Fire 中 component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py”, 第 468 行, 在 _Fire 组件中, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py”, 第 684 行, 在 _CallAndUpdateTrace 组件中 = fn(*varargs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py”,第 179 行,在 local_chat 中 生成 = prefill_and_generate( ^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py”,第 208 行,在 prefill_and_generate 中 logits = chunk_prefill(inputs[:, chunk_start:chunk_end], cache_position[chunk_start:chunk_end], past_key_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py”, 第 165 行, 在 chunk_prefill logits = model( ^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1739 行, 在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1750 行, 在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py”,第 1688 行,在 forward 输出 = self.model( ^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1739 行,在 _wrapped_call_impl 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1750 行,在_call_impl 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/models.py”,第 729 行,在前向 layer_outputs = decrypt_layer( ^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1739 行,在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1750 行,在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py”,第 1205 行,在前向 hidden_​​states、self_attn_weights、present_key_value = self.self_attn( ^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1739 行, 在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1750 行, 在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py”, 第 599 行,在 forward 中 返回 self.forward_windows( ^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py”, 第 539 行,在 forward_windows 中 返回 self.forward_chunck( ^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py”, 第 90 行,在 forward_chunck 中 q = self.q_b_proj(self.q_a_layernorm(self.q_a_proj(hidden_​​states))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1739 行,在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1750 行,在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py”,第 105 行,正向 hidden_​​states = hidden_​​states.to(torch.float32) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError:CUDA 错误:无效的设备功能 使用 TORCH_USE_CUDA_DSA 进行编译以启用设备端断言。

(torchenv)tg@tg-Super-Server:$ echo $TORCH_USE_CUDA_DSA && echo $CUDA_LAUNCH_BLOCKING && echo PYTORCH_USE_CUDA_DSA 1 1 1 (torchenv)tg@tg-Super-Server:

解决了吗老哥?我也是这个报错

<!-- gh-comment-id:2750429577 --> @annian101 commented on GitHub (Mar 25, 2025): > > 您可以提供错误日志 > > 这是错误日志: 回溯(最近一次调用最后一次): 文件“”,第 198 行,在 _run_module_as_main 中 文件“”,第 88 行,在 _run_code 中 文件“/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py”,第 185 行,在 fire.Fire(local_chat) 中 文件“/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py”,第 135 行,在 Fire 中 component_trace = _Fire(component, args, parsed_flag_args, context, name) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py”, 第 468 行, 在 _Fire 组件中, remaining_args = _CallAndUpdateTrace( ^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/miniconda3/envs/torchenv/lib/python3.11/site-packages/fire-0.7.0-py3.11.egg/fire/core.py”, 第 684 行, 在 _CallAndUpdateTrace 组件中 = fn(*varargs, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/local_chat.py”,第 179 行,在 local_chat 中 生成 = prefill_and_generate( ^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py”,第 208 行,在 prefill_and_generate 中 logits = chunk_prefill(inputs[:, chunk_start:chunk_end], cache_position[chunk_start:chunk_end], past_key_values) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/util/utils.py”, 第 165 行, 在 chunk_prefill logits = model( ^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1739 行, 在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1750 行, 在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py”,第 1688 行,在 forward 输出 = self.model( ^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1739 行,在 _wrapped_call_impl 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1750 行,在_call_impl 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/models.py”,第 729 行,在前向 layer_outputs = decrypt_layer( ^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1739 行,在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1750 行,在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py”,第 1205 行,在前向 hidden_​​states、self_attn_weights、present_key_value = self.self_attn( ^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1739 行, 在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”, 第 1750 行, 在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py”, 第 599 行,在 forward 中 返回 self.forward_windows( ^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py”, 第 539 行,在 forward_windows 中 返回 self.forward_chunck( ^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/operators/attention.py”, 第 90 行,在 forward_chunck 中 q = self.q_b_proj(self.q_a_layernorm(self.q_a_proj(hidden_​​states))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1739 行,在 _wrapped_call_impl 中 返回 self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/pytorch-2.6.0/torch/nn/modules/module.py”,第 1750 行,在 _call_impl 中 返回 forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 文件“/home/tg/GitProjects/ktransformers/ktransformers/models/modeling_deepseek_v3.py”,第 105 行,正向 hidden_​​states = hidden_​​states.to(torch.float32) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError:CUDA 错误:无效的设备功能 使用 TORCH_USE_CUDA_DSA 进行编译以启用设备端断言。 > > (torchenv)tg@tg-Super-Server:$ echo $TORCH_USE_CUDA_DSA && echo $CUDA_LAUNCH_BLOCKING && echo $PYTORCH_USE_CUDA_DSA 1 1 1 (torchenv)tg@tg-Super-Server:$ 解决了吗老哥?我也是这个报错
Author
Owner

@swordfar commented on GitHub (Mar 25, 2025):

需要TF32精度支持。P100不支持,需要30系列(或者对标)显卡以上

<!-- gh-comment-id:2751561155 --> @swordfar commented on GitHub (Mar 25, 2025): 需要TF32精度支持。P100不支持,需要30系列(或者对标)显卡以上
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#688
No description provided.