fatal error C1002: 在第2遍中编译器的堆空间不足

windows编译 TensorFlow gpu时报错:

fatal error C1002: 在第2遍中编译器的堆空间不足


-G 指定生成目标版本。命令行输入cmake -G,可以查看可选的版本列表。

-T host=64 是网上很多教程忽略的一点,我之前也用VS2017编译过,因为没有指定-T host=64,导致使用了32位的编译器,出现fatal error C1060: "编译器的堆空间不足"的错误。


参考:

https://github.com/tensorflow/tensorflow/issues/11771

Did you use the 32 bits cl.exe or 64 bits cl.exe?

set PreferredToolArchitecture=x64

Run this command before open tensorflow.sln

Or, add "-T host=x64" to cmake command line args.


猜你喜欢

转载自blog.csdn.net/jacke121/article/details/80433119