-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
libtorch-ffi errors when profiling with --profile
#706
Comments
I get the same error just compiling with |
This also happened with libtorch-ffi 2.0 using nix for compilation. |
@kenhkan From the error message, I think it's a issue with the compiler version (C++14). Do you get the same error on the latest branch using C++17? Or could you try it? |
@junjihashimoto I use gcc 11.4 which should use C++17 by default.
I also tried setting the environment variable directly:
The same message resulted. |
I forgot to mention. I tried both my original hasktorch commit as well as the current master commit 16b7e3e. |
@kenhkan Thank you for trying both cases! GHC defines PROFILING.
|
There is no code using the macro(
|
@junjihashimoto Ah! It didn't occur to me that it'd be something in libtorch itself that interferes with GHC. It wouldn't work to replace individual symbols. I've redacted the log in my original post for brevity. The full log is over 1000 lines long of similar errors spanning across 35 files. I've attached them here. I assume that profiling does work for you. What is your setup? I don't know how I could prevent those files to be included so maybe I could try copying your setup. |
Circling back to this issue, I'm getting a slightly different error when compiling with profiling support:
There are a couple of options I can change with Nix to fix this:
|
I have a program that runs as expected when running without profiling:
However, when I run the same program with profiling turned on, I get a host of errors (at the end of this message) even though I have indicated
--no-library-profiling
to stack:The only difference is the stack command run. I'm actually interested in profiling only my part of the codebase and don't need to profile any part of hasktorch, but the codebase is of course intertwined with references to Torch, so I can't really take out the dependency to test. Does anyone have any insight on profiling their codebases with hasktorch as a dependency?
The errors are:
The text was updated successfully, but these errors were encountered: