Jittor / JittorLLMs

计图大模型推理库,具有高性能、配置要求低、中文支持好、可移植等特点
Apache License 2.0
2.33k stars 181 forks source link

cli_demo.py chatglm demo报错 #48

Open linkerlin opened 1 year ago

linkerlin commented 1 year ago

环境: win 10 ananconda python 3.10 CUDA 11.7.1 jTorch 已经安装


出错信息:

PS G:\pys\JittorLLMs> python cli_demo.py chatglm
[i 0417 02:47:56.967000 52 compiler.py:955] Jittor(1.3.7.13) src: e:\anaconda3\lib\site-packages\jittor
[i 0417 02:47:57.020000 52 compiler.py:956] cl at C:\Users\linke\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe(19.29.30133)
[i 0417 02:47:57.021000 52 compiler.py:957] cache_path: C:\Users\linke\.cache\jittor\jt1.3.7\cl\py3.10.9\Windows-10-10.x9e\IntelRCoreTMi5x25\default
[i 0417 02:47:57.026000 52 install_cuda.py:93] cuda_driver_version: [12, 0, 0]
[i 0417 02:47:57.079000 52 __init__.py:411] Found C:\Users\linke\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe(11.2.67) at C:\Users\linke\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe.
[i 0417 02:47:57.155000 52 compiler.py:1010] cuda key:cu11.2.67
[i 0417 02:47:57.156000 52 __init__.py:227] Total mem: 31.88GB, using 10 procs for compiling.
[i 0417 02:47:58.942000 52 jit_compiler.cc:28] Load cc_path: C:\Users\linke\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe
[i 0417 02:47:58.944000 52 init.cc:62] Found cuda archs: [75,]
[i 0417 02:47:59.243000 52 compile_extern.py:522] mpicc not found, distribution disabled.
[w 0417 02:47:59.352000 52 compile_extern.py:203] CUDA related path found in LD_LIBRARY_PATH or PATH(['', 'C', '\\Users\\linke\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib64', '', 'C', '\\Users\\linke\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\bin', '', 'C', '\\Users\\linke\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\lib', '', 'C', '\\Users\\linke\\.cache\\jittor\\jt1.3.7\\cl\\py3.10.9\\Windows-10-10.x9e\\IntelRCoreTMi5x25\\default', '', 'C', '\\Users\\linke\\.cache\\jittor\\jt1.3.7\\cl\\py3.10.9\\Windows-10-10.x9e\\IntelRCoreTMi5x25\\default\\cu11.2.67', '', 'C', '\\Users\\linke\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\bin', '', 'C', '\\Users\\linke\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib\\x64', '', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\win10_kits\\lib\\ucrt\\x64', '', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\win10_kits\\lib\\um\\x64', '', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\VC\\lib', '', 'e', '\\anaconda3\\libs', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\VC\\_\\_\\_\\_\\_\\bin', 'C', '\\Users\\linke\\AppData\\Local\\Programs\\Python\\Python38\\Scripts\\', 'C', '\\Users\\linke\\AppData\\Local\\Programs\\Python\\Python38\\', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.7\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.7\\libnvvp', '', 'C', '\\Program Files\\Eclipse Foundation\\jdk-8.0.302.8-hotspot\\bin', 'C', '\\Program Files\\Common Files\\Oracle\\Java\\javapath', 'C', '\\Program Files\\ImageMagick-7.0.8-Q16', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\libnvvp', 'C', '\\windows\\system32', 'C', '\\windows', 'C', '\\windows\\System32\\Wbem', 'C', '\\windows\\System32\\WindowsPowerShell\\v1.0\\', 'C', '\\windows\\System32\\OpenSSH\\', 'C', '\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common', 'C', '\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR', 'C', '\\Program Files\\dotnet\\', 'C', '\\Program Files (x86)\\dotnet\\', 'C', '\\ProgramData\\chocolatey\\bin', 'C', '\\Program Files (x86)\\vim\\vim80', 'C', '\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\Hostx64\\x64', 'C', '\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\include', 'E', '\\Program Files\\CMake\\bin', 'C', '\\WINDOWS\\system32', 'C', '\\WINDOWS', 'C', '\\WINDOWS\\System32\\Wbem', 'C', '\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\', 'C', '\\WINDOWS\\System32\\OpenSSH\\', 'C', '\\Program Files (x86)\\IncrediBuild', 'C', '\\Program Files\\nodejs\\', 'C', '\\Program Files\\Redis\\', 'C', '\\Program Files\\PuTTY\\', 'C', '\\Program Files (x86)\\ZeroTier\\One\\', 'D', '\\Go\\bin', 'C', '\\Program Files\\GitHub CLI\\', 'C', '\\Program Files (x86)\\Tailscale IPN', 'C', '\\Program Files\\NVIDIA Corporation\\Nsight Compute 2022.2.1\\', 'C', '\\Program Files\\Process Lasso\\', 'C', '\\Program Files\\Git\\cmd', 'E', '\\anaconda3', 'E', '\\anaconda3\\Scripts', 'E', '\\anaconda3\\condabin', 'E', '\\anaconda3\\DLLs', 'C', '\\Python310', 'C', '\\Python310\\Scripts', 'C', '\\Python310\\Lib\\site-packages', 'G', '\\cuda117_bin', 'D', '\\msys64\\ucrt64\\bin', 'D', '\\msys64\\usr\\bin', 'C', '\\Python310\\lib\\site-packages\\torch\\lib', 'C', '\\Python39', 'c', '\\python39\\Scripts', 'C', '\\ProgramData\\chocolatey\\bin', 'G', '\\pypy3.9-v7.3.11-win64', 'C', '\\Users\\linke\\go\\bin', 'C', '\\Users\\linke\\scoop\\shims', 'C', '\\Users\\linke\\AppData\\Local\\Microsoft\\WindowsApps', 'C', '\\Users\\linke\\AppData\\Local\\Programs\\Microsoft VS Code\\bin', 'C', '\\Users\\linke\\AppData\\Roaming\\npm', 'C', '\\Users\\linke\\AppData\\Local\\ComposerSetup\\bin', 'C', '\\Users\\linke\\AppData\\Roaming\\Composer\\vendor\\bin', 'C', '\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64', '']), This path may cause jittor found the wrong libs, please unset LD_LIBRARY_PATH and remove cuda lib path in Path.
Or you can let jittor install cuda for you: `python3.x -m jittor_utils.install_cuda`
[w 0417 02:47:59.356000 52 compile_extern.py:203] CUDA related path found in LD_LIBRARY_PATH or PATH(['', 'C', '\\Users\\linke\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib64', '', 'C', '\\Users\\linke\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\bin', '', 'C', '\\Users\\linke\\.cache\\jittor\\mkl\\dnnl_win_2.2.0_cpu_vcomp\\lib', '', 'C', '\\Users\\linke\\.cache\\jittor\\jt1.3.7\\cl\\py3.10.9\\Windows-10-10.x9e\\IntelRCoreTMi5x25\\default', '', 'C', '\\Users\\linke\\.cache\\jittor\\jt1.3.7\\cl\\py3.10.9\\Windows-10-10.x9e\\IntelRCoreTMi5x25\\default\\cu11.2.67', '', 'C', '\\Users\\linke\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\bin', '', 'C', '\\Users\\linke\\.cache\\jittor\\jtcuda\\cuda11.2_cudnn8_win\\lib\\x64', '', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\win10_kits\\lib\\ucrt\\x64', '', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\win10_kits\\lib\\um\\x64', '', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\VC\\lib', '', 'e', '\\anaconda3\\libs', 'C', '\\Users\\linke\\.cache\\jittor\\msvc\\VC\\_\\_\\_\\_\\_\\bin', 'C', '\\Users\\linke\\AppData\\Local\\Programs\\Python\\Python38\\Scripts\\', 'C', '\\Users\\linke\\AppData\\Local\\Programs\\Python\\Python38\\', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.7\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.7\\libnvvp', '', 'C', '\\Program Files\\Eclipse Foundation\\jdk-8.0.302.8-hotspot\\bin', 'C', '\\Program Files\\Common Files\\Oracle\\Java\\javapath', 'C', '\\Program Files\\ImageMagick-7.0.8-Q16', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\bin', 'C', '\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v10.1\\libnvvp', 'C', '\\windows\\system32', 'C', '\\windows', 'C', '\\windows\\System32\\Wbem', 'C', '\\windows\\System32\\WindowsPowerShell\\v1.0\\', 'C', '\\windows\\System32\\OpenSSH\\', 'C', '\\Program Files (x86)\\NVIDIA Corporation\\PhysX\\Common', 'C', '\\Program Files\\NVIDIA Corporation\\NVIDIA NvDLISR', 'C', '\\Program Files\\dotnet\\', 'C', '\\Program Files (x86)\\dotnet\\', 'C', '\\ProgramData\\chocolatey\\bin', 'C', '\\Program Files (x86)\\vim\\vim80', 'C', '\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\bin\\Hostx64\\x64', 'C', '\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Community\\VC\\Tools\\MSVC\\14.22.27905\\include', 'E', '\\Program Files\\CMake\\bin', 'C', '\\WINDOWS\\system32', 'C', '\\WINDOWS', 'C', '\\WINDOWS\\System32\\Wbem', 'C', '\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\\', 'C', '\\WINDOWS\\System32\\OpenSSH\\', 'C', '\\Program Files (x86)\\IncrediBuild', 'C', '\\Program Files\\nodejs\\', 'C', '\\Program Files\\Redis\\', 'C', '\\Program Files\\PuTTY\\', 'C', '\\Program Files (x86)\\ZeroTier\\One\\', 'D', '\\Go\\bin', 'C', '\\Program Files\\GitHub CLI\\', 'C', '\\Program Files (x86)\\Tailscale IPN', 'C', '\\Program Files\\NVIDIA Corporation\\Nsight Compute 2022.2.1\\', 'C', '\\Program Files\\Process Lasso\\', 'C', '\\Program Files\\Git\\cmd', 'E', '\\anaconda3', 'E', '\\anaconda3\\Scripts', 'E', '\\anaconda3\\condabin', 'E', '\\anaconda3\\DLLs', 'C', '\\Python310', 'C', '\\Python310\\Scripts', 'C', '\\Python310\\Lib\\site-packages', 'G', '\\cuda117_bin', 'D', '\\msys64\\ucrt64\\bin', 'D', '\\msys64\\usr\\bin', 'C', '\\Python310\\lib\\site-packages\\torch\\lib', 'C', '\\Python39', 'c', '\\python39\\Scripts', 'C', '\\ProgramData\\chocolatey\\bin', 'G', '\\pypy3.9-v7.3.11-win64', 'C', '\\Users\\linke\\go\\bin', 'C', '\\Users\\linke\\scoop\\shims', 'C', '\\Users\\linke\\AppData\\Local\\Microsoft\\WindowsApps', 'C', '\\Users\\linke\\AppData\\Local\\Programs\\Microsoft VS Code\\bin', 'C', '\\Users\\linke\\AppData\\Roaming\\npm', 'C', '\\Users\\linke\\AppData\\Local\\ComposerSetup\\bin', 'C', '\\Users\\linke\\AppData\\Roaming\\Composer\\vendor\\bin', 'C', '\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\Hostx64\\x64', '']), This path may cause jittor found the wrong libs, please unset LD_LIBRARY_PATH and remove cuda lib path in Path.
Or you can let jittor install cuda for you: `python3.x -m jittor_utils.install_cuda`
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a `revision` is encouraged when loading a configuration with custom code to ensure no malicious code has been contributed in a newer revision.
Explicitly passing a `revision` is encouraged when loading a model with custom code to ensure no malicious code has been contributed in a newer revision.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 8/8 [02:24<00:00, 18.07s/it]
[i 0417 02:50:28.604000 52 cuda_flags.cc:39] CUDA enabled.
用户输入:你是谁?

Compiling Operators(5/5) used: 8.74s eta:    0s
[e 0417 08:15:20.745000 52 log.cc:565] cl : Command line warning D9025 : overriding '/EHa' with '/EHs'
code__IN_SIZE_1__in0_dim_4__in0_type_float32__OUT_SIZE_1__out0_dim_4__out0_type_float32__H___hash_3febe3994cb3e308_op.cc
e:\anaconda3\include\cuda\std\detail/libcxx/include/type_traits(4842): error: identifier "__builtin_is_constant_evaluated" is undefined

e:\anaconda3\include\cuda\std\detail/libcxx/include/type_traits(4847): error: identifier "__builtin_is_constant_evaluated" is undefined

2 errors detected in the compilation of "C:/Users/linke/.cache/jittor/jt1.3.7/cl/py3.10.9/Windows-10-10.x9e/IntelRCoreTMi5x25/default/cu11.2.67/jit/code__IN_SIZE_1__in0_dim_4__in0_type_float32__OUT_SIZE_1__out0_dim_4__out0_type_float32__H___hash_3febe3994cb3e308_op.cc".
code__IN_SIZE_1__in0_dim_4__in0_type_float32__OUT_SIZE_1__out0_dim_4__out0_type_float32__H___hash_3febe3994cb3e308_op.cc

Traceback (most recent call last):
  File "G:\pys\JittorLLMs\cli_demo.py", line 9, in <module>
    model.chat()
  File "G:\pys\JittorLLMs\models\chatglm\__init__.py", line 36, in chat
    for response, history in self.model.stream_chat(self.tokenizer, text, history=history):
  File "C:\Users\linke/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 1259, in stream_chat
    for outputs in self.stream_generate(**input_ids, **gen_kwargs):
  File "C:\Users\linke/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 1336, in stream_generate
    outputs = self(
  File "E:\anaconda3\lib\site-packages\jtorch\nn\__init__.py", line 16, in __call__
    return self.forward(*args, **kw)
  File "C:\Users\linke/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 1138, in forward
    transformer_outputs = self.transformer(
  File "E:\anaconda3\lib\site-packages\jtorch\nn\__init__.py", line 16, in __call__
    return self.forward(*args, **kw)
  File "C:\Users\linke/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 973, in forward
    layer_ret = layer(
  File "E:\anaconda3\lib\site-packages\jtorch\nn\__init__.py", line 16, in __call__
    return self.forward(*args, **kw)
  File "C:\Users\linke/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 614, in forward
    attention_outputs = self.attention(
  File "E:\anaconda3\lib\site-packages\jtorch\nn\__init__.py", line 16, in __call__
    return self.forward(*args, **kw)
  File "C:\Users\linke/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 454, in forward
    cos, sin = self.rotary_emb(q1, seq_len=position_ids.max() + 1)
  File "E:\anaconda3\lib\site-packages\jtorch\nn\__init__.py", line 16, in __call__
    return self.forward(*args, **kw)
  File "C:\Users\linke/.cache\huggingface\modules\transformers_modules\local\modeling_chatglm.py", line 202, in forward
    t = torch.arange(seq_len, device=x.device, dtype=self.inv_freq.dtype)
  File "E:\anaconda3\lib\site-packages\jtorch\__init__.py", line 31, in inner
    ret = func(*args, **kw)
  File "E:\anaconda3\lib\site-packages\jittor\misc.py", line 809, in arange
    if isinstance(start, jt.Var): start = start.item()
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.item)).

Types of your inputs are:
 self   = Var,
 args   = (),

The function declarations are:
 ItemData item()

Failed reason:[f 0417 08:15:20.757000 52 parallel_compiler.cc:330] Error happend during compilation:
 [Error] source file location:C:\Users\linke\.cache\jittor\jt1.3.7\cl\py3.10.9\Windows-10-10.x9e\IntelRCoreTMi5x25\default\cu11.2.67\jit\code__IN_SIZE_1__in0_dim_4__in0_type_float32__OUT_SIZE_1__out0_dim_4__out0_type_float32__H___hash_3febe3994cb3e308_op.cc
Compile operator(1/7)failed:Op(12536:0:1:1:i1:o1:s0,code->12537)

Reason: [f 0417 08:15:20.745000 52 log.cc:608] Check failed ret(1) == 0(0) Run cmd failed: "C:\Users\linke\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin\nvcc.exe" "C:\Users\linke\.cache\jittor\jt1.3.7\cl\py3.10.9\Windows-10-10.x9e\IntelRCoreTMi5x25\default\cu11.2.67\jit\code__IN_SIZE_1__in0_dim_4__in0_type_float32__OUT_SIZE_1__out0_dim_4__out0_type_float32__H___hash_3febe3994cb3e308_op.cc"            -shared  -L"e:\anaconda3\libs" -lpython310  -Xcompiler -EHa -Xcompiler -MD -Xcompiler -utf-8   -I"C:\Users\linke\.cache\jittor\msvc\VC\include" -I"C:\Users\linke\.cache\jittor\msvc\win10_kits\include\ucrt" -I"C:\Users\linke\.cache\jittor\msvc\win10_kits\include\shared" -I"C:\Users\linke\.cache\jittor\msvc\win10_kits\include\um" -DNOMINMAX  -L"C:\Users\linke\.cache\jittor\msvc\VC\lib" -L"C:\Users\linke\.cache\jittor\msvc\win10_kits\lib\um\x64" -L"C:\Users\linke\.cache\jittor\msvc\win10_kits\lib\ucrt\x64"  -I"e:\anaconda3\lib\site-packages\jittor\src" -I"e:\anaconda3\include" -DHAS_CUDA -DIS_CUDA -I"C:\Users\linke\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\include" -I"e:\anaconda3\lib\site-packages\jittor\extern\cuda\inc"  -lcudart -L"C:\Users\linke\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\lib\x64" -L"C:\Users\linke\.cache\jittor\jtcuda\cuda11.2_cudnn8_win\bin"  -I"C:\Users\linke\.cache\jittor\jt1.3.7\cl\py3.10.9\Windows-10-10.x9e\IntelRCoreTMi5x25\default\cu11.2.67" -L"C:\Users\linke\.cache\jittor\jt1.3.7\cl\py3.10.9\Windows-10-10.x9e\IntelRCoreTMi5x25\default\cu11.2.67" -L"C:\Users\linke\.cache\jittor\jt1.3.7\cl\py3.10.9\Windows-10-10.x9e\IntelRCoreTMi5x25\default"  -l"jit_utils_core.cp310-win_amd64"  -l"jittor_core.cp310-win_amd64"  -x cu --cudart=shared -ccbin="C:\Users\linke\.cache\jittor\msvc\VC\_\_\_\_\_\bin\cl.exe" --use_fast_math  -w  -I"e:\anaconda3\lib\site-packages\jittor\extern/cuda/inc"  -arch=compute_75  -code=sm_75  -o "C:\Users\linke\.cache\jittor\jt1.3.7\cl\py3.10.9\Windows-10-10.x9e\IntelRCoreTMi5x25\default\cu11.2.67\jit\code__IN_SIZE_1__in0_dim_4__in0_type_float32__OUT_SIZE_1__out0_dim_4__out0_type_float32__H___hash_3febe3994cb3e308_op.dll" -Xlinker -EXPORT:"?jit_run@CodeOp@jittor@@QEAAXXZ"
BlueMain commented 1 year ago

和你一样的错误,坐等官方回答

AceyKubbo commented 1 year ago

附议,我在公司电脑和家里电脑安装之后也是这个报错,能正常运行,回答的时候就报D9025

johnlui commented 1 year ago

我也遇到这个问题了,web 和 cli 都是这个错误,这个错误也太低级了,核心函数升级了,调用入口没更新,哪怕运行一下呢,都能发现这个问题

zengxiaofei commented 1 year ago

the same problem

Cweili commented 1 year ago

Same problem.

BlueMain commented 1 year ago

我也遇到这个问题了,web 和 cli 都是这个错误,这个错误也太低级了,核心函数升级了,调用入口没更新,哪怕运行一下呢,都能发现这个问题

你能正常运行起来了吗 ?是要修改哪里 ?

zengxiaofei commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

johnlui commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

竟然还需要 swap,我服务器上 swap 都是默认关的😂

zengxiaofei commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

竟然还需要 swap,我服务器上 swap 都是默认关的😂

其实我是在windows上装的,程序会在个人目录下.cache里生成临时文件,RAM够的情况下,保证这部分磁盘空间充足应该就ok。linux应该也一样,保证对应生成临时文件的目录空间足够就好,在RAM足够的情况下也用不上Linux意义上的"swap"

imshadow commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

请问怎么解决的?

zengxiaofei commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

请问怎么解决的?

就如我前面说的,保证显存+内存+硬盘剩余空间足够应该就能跑起来。 比如我显存4G、内存16G的笔记本,device limit设置的3.5G,ram limit设置的10G,最后保证C盘的空间足够就可以。

imshadow commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

请问怎么解决的?

就如我前面说的,保证显存+内存+硬盘剩余空间足够应该就能跑起来。 比如我显存4G、内存16G的笔记本,device limit设置的3.5G,ram limit设置的10G,最后保证C盘的空间足够就可以。

谢谢,我的笔记本就是4+16的,但是我device limit设置的3G,ram limit设置的8G,我看控制台也读取到了limit设置,但是还是不行,我的C盘空间确实不够了,但是我设置了JITTOR_HOME环境变量到别的盘,最后尝试了好久还是不行,放弃了

zengxiaofei commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

请问怎么解决的?

就如我前面说的,保证显存+内存+硬盘剩余空间足够应该就能跑起来。 比如我显存4G、内存16G的笔记本,device limit设置的3.5G,ram limit设置的10G,最后保证C盘的空间足够就可以。

谢谢,我的笔记本就是4+16的,但是我device limit设置的3G,ram limit设置的8G,我看控制台也读取到了limit设置,但是还是不行,我的C盘空间确实不够了,但是我设置了JITTOR_HOME环境变量到别的盘,最后尝试了好久还是不行,放弃了

你可以按照我的设置试试,limit设置太少,占的硬盘空间也就越多。我设置的3.5和10G应该还算保守,C盘多个10多G就够了

imshadow commented 1 year ago

我最后还是解决了这个问题,代码应该没什么问题,主要还是显存、内存、swap其中之一不足。保证swap空间足够,降低cpu和device memory limits就好了。

请问怎么解决的?

就如我前面说的,保证显存+内存+硬盘剩余空间足够应该就能跑起来。 比如我显存4G、内存16G的笔记本,device limit设置的3.5G,ram limit设置的10G,最后保证C盘的空间足够就可以。

谢谢,我的笔记本就是4+16的,但是我device limit设置的3G,ram limit设置的8G,我看控制台也读取到了limit设置,但是还是不行,我的C盘空间确实不够了,但是我设置了JITTOR_HOME环境变量到别的盘,最后尝试了好久还是不行,放弃了

你可以按照我的设置试试,limit设置太少,占的硬盘空间也就越多。我设置的3.5和10G应该还算保守,C盘多个10多G就够了

好的,回去我试试,谢谢