rapidsai / rapids-examples

33 stars 24 forks source link

Example for integration between pycuda and cudf #16

Closed shaneding closed 3 years ago

shaneding commented 3 years ago

closes #10

cc @VibhuJawa @beckernick @randerzander @jdye64

VibhuJawa commented 3 years ago

Now that we have stand-alone kernels working, it might be worth exploring how you can call external libraries inside such a code too.

An example of calling Thrust+pycuda is below: https://forums.developer.nvidia.com/t/pycuda-thrust-example-in-case-someone-is-curious/17795

An example can be calling say a libcudf function or an external library in general. We should first aim on how to do this with just numerical columns.

Another huge win for us will be if we can call a strings UDF using this on a strings column. I am not sure if this possible or not but if it is it makes the experience of using strings UDF straightforward.

CC: @randerzander , @beckernick for thoughts.

randerzander commented 3 years ago

Now that we have stand-alone kernels working, it might be worth exploring how you can call external libraries inside such a code too.

An example of calling Thrust+pycuda is below: https://forums.developer.nvidia.com/t/pycuda-thrust-example-in-case-someone-is-curious/17795

An example can be calling say a libcudf function or an external library in general. We should first aim on how to do this with just numerical columns.

Agree. I think it would make sense to "duplicate" the logic of @jdye64's existing example with the weather data, where it's all implemented with pycuda (advantage being, no need to add Cython bindings or have all the build infrastructure).

Another huge win for us will be if we can call a strings UDF using this on a strings column. I am not sure if this possible or not but if it is it makes the experience of using strings UDF straightforward.

Agree, this would be amazing to get working via PyCuda. Would make string UDF functionality far more accessible