shader-slang / slang-python

Superseded by github.com/shader-slang/slang-torch
MIT License
26 stars 3 forks source link

Compile cache frequently stale #17

Open cshenton-work opened 4 months ago

cshenton-work commented 4 months ago

Windows 11 Python 3.12.2 with installer Slangpy 1.1.22

I am running into an issue where slang's cache is frequently pulling in stale code, for example throwing up warnings for code I deleted since the last run.

It could be that the mechanism used to detect changes to the .slang source files is faulty?

saipraveenb25 commented 4 months ago

Hi @cshenton-work, would you be able to provide a code snippet that shows this issue? Is the stale cache caused by changing the main .slang file or an imported file? (or a .cu file that you may be using for interop)

saipraveenb25 commented 4 months ago

One way to see what's going on is to use the verbose form loadModule('myfile.slang', verbose=True). You should see a wall of text showing the reasons for skipping the re-build. Pasting that here would definitely help me zero in on the issue. Thanks in advance!

half-potato commented 3 months ago

I've noticed that the cache will go stale if you rename the folder containing the slang code. Maybe this is specific to when the directory is nested once.