Open shwina opened 2 years ago
@benbarsdell this is the same issue I reported a while ago. Did you have a chance to think about how to fix this?
I'll see if I can take another look at this later this week.
@benbarsdell Hi, any updates on this? I'm reviewing https://github.com/rapidsai/cudf/pull/11287 and would like to understand the issue / what solutions might be possible.
I believe the root cause of this is the #include <climits>
header being loaded from jitify's builtins and cached, and then, when #include "climits"
is encountered within libcu++, jitify uses the cached version instead of the new one.
The solution will be to distinguish between #include <foo>
and #include "foo"
in the header cache. However, it is further complicated by the fact that NVRTC does not support such a distinction. I think the only way around that will be to automatically patch #include "foo"
to #include </path/to/foo>
(if and only if /path/to/foo
exists).
Unfortunately this is easier said than done, which is why I haven't got to it yet.
In terms of workarounds, removing #include <limits>
and just using the libcu++ version should work, if that's doable in your code. There may be other workarounds too.
Invoking jitify with the following source file:
as follows:
results in:
As a workaround I can do: