Giter Club home page Giter Club logo

Comments (4)

kmaehashi avatar kmaehashi commented on June 18, 2024

IIRC the problem with pre-generated cache is that some headers depend on files under /usr/local/cuda/include which is user environment dependent. 😢

from cupy.

leofang avatar leofang commented on June 18, 2024

I am thinking about this too. I think the bigger problem is that the cache keys can contain includes with relative paths (or truncated paths in the bracket form <...> that requires the compiler to search), which makes it very hard to identify the source of the headers. If we normalize all keys to absolute path, maybe it'd make things easier/safer? For example, we can exclude CUDA headers just by checking their path prefix. However, we'll pay a price during cache lookup (de-normalizing an absolute path to relative/truncated path).

from cupy.

kmaehashi avatar kmaehashi commented on June 18, 2024

If we normalize all keys to absolute path, maybe it'd make things easier/safer?

I think there's no formal way to do that... If A/B/C.h has a #include <D.h> line, we only get D.h as a key, so we don't have knowledge of which file tried to include D.h nor which directory D.h is in.

from cupy.

leofang avatar leofang commented on June 18, 2024

Right, so when I noted

we might have to either implement it ourselves or use the WIP (NVIDIA/jitify#131).

I meant we'll no longer rely on NVRTC to find headers, but instead roll out a search logic that mimics the compiler behavior. This is the only way we can gain knowledge about header location. I think NVIDIA/jitify#131 did quite a bit of the work, I just don't know if in the long term we'd still want to use Jitify, or just vender that search loop implementation in CuPy and move on.

xref: NVIDIA/jitify#107 (comment)

from cupy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.