LaurentMazare / tch-rs

Rust bindings for the C++ api of PyTorch.
Apache License 2.0
4.36k stars 348 forks source link

Can't compile static #877

Open theaddonn opened 4 months ago

theaddonn commented 4 months ago

I tried linking it statically via setting the env var LIBTORCH_STATIC to 1, but I got the error when trying to compile it:

LINK : fatal error LNK1356: cannot find library `dnnl_graph.lib' specified to be whole archived

What can I do to get torch linked statically?

cantor-set commented 3 months ago

@theaddonn Were you able to fix this issue? I am encountering the same problem. So far, I have

Stuck on the error asking for that library dnnl_graph which is a cpp header on the third party folder of torch, I am not able to compile it independently.

Not sure if relevant, I am seeing this error on Apple Silicon M1.

theaddonn commented 3 months ago

@cantor-set no, I sadly couldn't. Please, if you find out how. Contact me please

cantor-set commented 3 months ago

I tried this on Linux. Same result. Static build seems to be broken.