Right now if the Action graph is a DAG and we encounter an action twice,
we will run it twice.
This patch is difficult to test as-is, but I have testcases for this as
used within CUDA compilation.
Paths
| Differential D15960
Don't build jobs for the same Action + ToolChain twice. ClosedPublic Authored by jlebar on Jan 7 2016, 11:28 AM.
Details
Diff Detail Event Timelinejlebar updated this object. Comment Actions This actually has a subtle issue not found with existing unit tests: BuildJobsForAction has an outparam and we don't set it on cache hit. Please hold off reviewing this until I fix the problem. jlebar added a parent revision: D16013: Make Driver::BuildJobsForAction return an InputInfo, instead of using an outparam.. Comment ActionsFixing bug caused by missing an outparam. Covered by tests in WIP CUDA+ptxas+fatbin patch. Depends on D16013. Comment Actions OK, this is now working, please have a look. I'm not sure if it's possible to write a test as-is, but I have a test for my mistake in my WIP CUDA patch. (Also this mistake is much harder to make after D16013.) Comment Actions So, how are you getting to the point where you're trying to create the same action twice? -eric Comment Actions
In the new CUDA world, we have the following graph, which I hope will render properly: foo.cu --> foo.s (PTX) --> foo.cubin --> foo.fatbin └-----------------------┙ That is, foo.s is an input to foo.cubin *and* an input to foo.fatbin. The Driver stores each Action's inputs. So starting from the fatbin, we look at its two inputs, and try to create jobs for them. Fine. Then we look at the input to the cubin. That's foo.s, which we already visited. Comment Actions Pushed in r257808 with echristo's lg (sorry, didn't have the right metadata in the commit). This revision is now accepted and ready to land.Jan 15 2016, 5:53 PM
Revision Contents
Diff 44377 include/clang/Driver/Driver.h
lib/Driver/Driver.cpp
|