NVIDIA / NVIDIA/cuda-python

Make `no_cache=True` the default in `LinkerOptions`?

Open
#950 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cuda.core RFC
Dominant language
Cython
Stars
3.4k
Forks
329
Avg merge
1d 23h
Merged PRs (30d)
116

Description

During the investigation of #920, I noticed that nvJitLink internally also has its own cache (likely sharing the driver cache). But it is confusing as a PTX developer when monitoring the info log: The first compilation I see this

self.get_info_log()='ptxas info    : 0 bytes gmem\nptxas info    : Function properties for add\nptxas         .     24 bytes stack frame, 16 bytes spill stores, 16 bytes spill loads\nptxas info    : Compile time = 2.002 ms\ninfo    : 16 bytes gmem\n\x00'

but second time onward it's only

self.get_info_log()='info    : 16 bytes gmem\n\x00'

Because the PTX is not re-compiled.

We already have a plan for caching (#176). I feel we should turn off nvJitLink's cache by default.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the LinkerOptions entry point and reviewing how nvJitLink caching affects repeated PTX compilation and info logs. Compare the caching plans in #920 and #176, then define the expected default and a test that verifies the resulting compilation behavior.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.