FS#64981 - [python-pytorch-cuda] Error when use torch.utils.cpp_extension.load
Attached to Project:
Community Packages
Opened by André Miranda (ardemiranda) - Sunday, 29 December 2019, 16:16 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 12 January 2020, 17:11 GMT
Opened by André Miranda (ardemiranda) - Sunday, 29 December 2019, 16:16 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Sunday, 12 January 2020, 17:11 GMT
|
Details
Description:
Compile a cuda code extension using pytorch cpp_extension. Cause the error: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/c++/cmath:45:15: fatal error: math.h: No such file or directory I resolved the issue with the attached patch. Additional info: * package version(s) 1.3.1-6 * config and/or log files etc. In file included from /opt/cuda/include/crt/math_functions.h:8841, from /opt/cuda/include/crt/common_functions.h:267, from /opt/cuda/include/cuda_runtime.h:115, from <command-line>: /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/c++/cmath:45:15: fatal error: math.h: No such file or directory #include_next <math.h> Steps to reproduce: Use the torch.utils.cpp_extension.load https://pytorch.org/docs/stable/cpp_extension.html |
This task depends upon
Closed by Sven-Hendrik Haase (Svenstaro)
Sunday, 12 January 2020, 17:11 GMT
Reason for closing: Fixed
Sunday, 12 January 2020, 17:11 GMT
Reason for closing: Fixed
Comment by
Sven-Hendrik Haase (Svenstaro) -
Saturday, 11 January 2020, 00:47 GMT
Comment by
André Miranda (ardemiranda) -
Saturday, 11 January 2020, 01:05 GMT
Comment by
Sven-Hendrik Haase (Svenstaro) -
Saturday, 11 January 2020, 17:36 GMT
Comment by
André Miranda (ardemiranda) -
Sunday, 12 January 2020, 16:41 GMT
If you check the current file at
/usr/lib/python3.8/site-packages/torch/utils/cpp_extension.py it
seems to already be in the post-patch state.
Sorry, the patch is inverted. Attached the correct.
Ok cool. I built a new package and put it into
[community-testing]. Please test rel -8 and give me feedback.
It's working. Thanks.