Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

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
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Konstantin Gizdov (kgizdov)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

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
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 11 January 2020, 00:47 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.
Comment by André Miranda (ardemiranda) - Saturday, 11 January 2020, 01:05 GMT
Sorry, the patch is inverted. Attached the correct.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 11 January 2020, 17:36 GMT
Ok cool. I built a new package and put it into [community-testing]. Please test rel -8 and give me feedback.
Comment by André Miranda (ardemiranda) - Sunday, 12 January 2020, 16:41 GMT
It's working. Thanks.

Loading...