Hi,

I have some code that was not initially written to be used via pyCUDA. However, 
it consists of some CUDA kernels of which one is the main kernel that is 
depending on/calling the others. Unfortunately, I did not manage to get it to 
work, since, with the below situation, I always get the following error:
pycuda._driver.LogicError: cuModuleGetFunction failed: not found
For the line:
main_kernel = mod.get_function('main_kernel')

The code looks something like this. It is simplified here for readability 
reasons.
Of course, the code is wrapped into

mod = SourceModule(""" <THE CODE> """, no_extern_c=1)

CODE:
#include "cutil_inline.h"
extern "C"
{
#include <time.h>
}
extern "C"
{
#include <float.h>
}

#include "custom.cuh"

extern "C"
{
void main_kernel(float* inp_P, unsigned int N, float* mappedX, unsigned int 
no_dims) {
// … Some code …
}
}

However, custom.cuh is not just a simple header file unfortunately, but rather 
the header  for custom.cu. To even complicate the whole story more, custom.cuh 
includes more_custom.cuh which, in turn, also has more_custom.cu.
When building this without pyCUDA, I would first compile the three .cu 
(main_kernel.cu, custom.cu and more_custom.cu) files and then link with the 
object file of the .cu file (e.g. Main.cu) that would be calling main_kernel().

Are there any suggestions how to proceed to make this work with pyCUDa?

Thank you in advance.

Best,

Cedric

Cedric Laczny,
PhD Student

UNIVERSITÉ DU LUXEMBOURG

LUXEMBOURG CENTRE FOR SYSTEMS BIOMEDICINE
Campus Belval | House of Biomedicine
7, avenue des Hauts-Fourneaux
L-4362 Esch-sur-Alzette
T +352 46 66 44 6398
F +352 46 66 44 6949
[email protected]<mailto:[email protected]>     
http://lcsb.uni.lu<http://lcsb.uni.lu/>


-----
This message is confidential and may contain privileged information. It is 
intended for the named recipient only. If you receive it in error please notify 
me and permanently delete the original message and any copies.
-----

_______________________________________________
PyCUDA mailing list
[email protected]
http://lists.tiker.net/listinfo/pycuda

Reply via email to