A little help understanding the runtime compiler source dependency and runtime modifiable include

53 views
Skip to first unread message

Daniel Moodie

unread,
Oct 21, 2015, 9:26:01 PM10/21/15
to Runtime-Compiled C++
So instead of using my previous hack for compiling cuda code, I wanted to work with the source dependency scheme.

So I have something like this:
DisplayHelpers.h <--- RCC class header
DisplayHelpers.cpp <--- RCC class
DisplayHelpers.cuh <--- cuda header
DisplayHelpers.cu <--- cuda code


I have an interface to my code which works with RCC, it has its own .cpp and .h file.
The DisplayHelpers.h includes a cuda header file "DisplayHelpers.cuh" which has the following:

#include "RuntimeInclude.h"
#include "RuntimeSourceDependency.h"
RUNTIME_MODIFIABLE_INCLUDE
RUNTIME_COMPILER_SOURCEDEPENDENCY_FILE("DisplayHelpers", ".cu");

Now when I edit DisplayHelpers.cu, the file monitor notices the change and attempts to do a recompile. 
However in RuntimeObjectSystem.cpp I'm running into an issue.

My fileToBuild (147) is the DisplayHelpers.cu file, it searches the m_RuntimeSourceDependencyMap (156) for this file.  When it finds that DisplayHelper.cpp depends on DisplayHelper.cu, it renames fileToBuild to DisplayHelper.h (line 160).
Thus the .cu file never gets built because it tries to build 

So I guess I misunderstand the purpose of RUNTIME_COMPILER_SOURCEDEPENDENCY / RUNTIME_MODIFIABLE_INCLUDE, could someone elaborate on what I should do in this situation?


Doug Binks

unread,
Oct 22, 2015, 4:56:33 AM10/22/15
to runtimecompi...@googlegroups.com
This looks like a bug to me. I'll investigate asap.

--
You received this message because you are subscribed to the Google Groups "Runtime-Compiled C++" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runtimecompiledcpl...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Doug Binks

unread,
Oct 22, 2015, 6:06:37 AM10/22/15
to runtimecompi...@googlegroups.com
I bug reported this here: https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledCPlusPlus/issues/80


Somewhat ashamed that I let this combo through :( Many apologies.

Let me know if this does / doesn't work for you!

Daniel Moodie

unread,
Oct 22, 2015, 1:31:19 PM10/22/15
to Runtime-Compiled C++
This looks to have fixed it, thank you so much!
To unsubscribe from this group and stop receiving emails from it, send an email to runtimecompiledcplusplus+unsub...@googlegroups.com.

Doug Binks

unread,
Oct 22, 2015, 1:39:32 PM10/22/15
to runtimecompi...@googlegroups.com

Excellent, many thanks for finding this issue and so cleanly describing it!

To unsubscribe from this group and stop receiving emails from it, send an email to runtimecompiledcpl...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Runtime-Compiled C++" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runtimecompiledcpl...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages