近日我非常想回家过年不想干活,但是回家过年的时候心里又非常不安年后的组会。于是我一边回家过年一边不安。

Command:                                                                                             
g++ /tmp/tmpbsdfhbwi/header.hpp -D TORCH_INDUCTOR_CPP_WRAPPER -D STANDALONE_TORCH_HEADER -D C10_USING
_CUSTOM_GENERATED_MACROS -O3 -DNDEBUG -fno-trapping-math -funsafe-math-optimizations -ffinite-math-on
ly -fno-signed-zeros -fno-math-errno -fno-finite-math-only -fno-unsafe-math-optimizations -ffp-contra
ct=off -fexcess-precision=fast -fno-tree-loop-vectorize -march=rv64gc -fPIC -Wall -std=c++17 -Wno-unu
sed-variable -Wno-unknown-pragmas -pedantic -fopenmp -I/usr/include/python3.11 -I/home/chenyixuan/pyt
orch/torch/include -I/home/chenyixuan/pytorch/torch/include/torch/csrc/api/include -E -P -o /tmp/tmpbsdfhbwi/header.i

Output:
In file included from /home/chenyixuan/pytorch/torch/include/torch/csrc/inductor/cpp_wrapper/cpu.h:3,
                 from /tmp/tmpbsdfhbwi/header.hpp:1:
/home/chenyixuan/pytorch/torch/include/torch/csrc/inductor/cpp_wrapper/common.h:9:10: fatal error: pybind11/gil_simple.h: No such file or directory
    9 | #include <pybind11/gil_simple.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

经过漫长的等待终于发现了这个常见错误,然而无论安装使用系统的 pybind11 还是在 python 虚拟环境里也装一个,或者是学习 ArchLinux 的 PKGBUILD中 使用环境变量 export use_system_pybind11 = on 都无法解决。当然,使用 export use_system_pybind11 = off 也无法解决。

还有一个问题就是写了 BLOCK_LIST 但是有些可以生效有些不能生效,也不知道是为啥。

在环境变量里 export USE_LAPACK=1 竟然可以测试通过之前 fail 的 LAPACK 项

/build/python-pytorch/src/pytorch/torch/csrc/dynamo/cpython_defs.c:228:20: error: invalid use of incomplete typedef ‘_PyInterpreterFrame’ {aka ‘struct _PyInterpreterFrame’} 228 | Py_DECREF(frame->f_funcobj);