fixstars / ion-kit

Modernized graph-based data processing framework
MIT License
7 stars 6 forks source link

Invalid pipeline is generated while targeting GPU #289

Closed iitaku closed 1 week ago

iitaku commented 1 week ago

https://github.com/fixstars/ion-kit/tree/feature/add-cuda-interop-test

iitaku commented 1 week ago
ION_LOG_LEVEL=debug ./test/cuda-interop_jit 
[2024-06-27 13:02:45.906] [ion] [debug] ion-kit version is v2.0.0-22-g19f6b51
[2024-06-27 13:02:46.346] [ion] [info] Start building pipeline
Using CUDA
[2024-06-27 13:02:46.347] [ion] [debug] Determine free port _ion_iport_0 as input0 on Node 5491c9f5-28c6-4b8e-9dec-8da266b6a565
Using CUDA
[2024-06-27 13:02:46.504] [ion] [debug] Inserted "__32a6ff3a_1f9b_45fd_a651_29be105e6e36_b00_cab72d90_afd3_4660_85b1_af3d314395e3" instance at #0
[2024-06-27 13:02:46.504] [ion] [debug] Inferred arguments stub
[2024-06-27 13:02:46.504] [ion] [debug]   #0 name(__32a6ff3a_1f9b_45fd_a651_29be105e6e36_b00_cab72d90_afd3_4660_85b1_af3d314395e3) kind(InputBuffer) dimensions(2) type(int32_t)
[2024-06-27 13:02:46.504] [ion] [debug] Generating arguments instance
[2024-06-27 13:02:46.504] [ion] [debug]   #0 0x5b3b82f0c8b8
[2024-06-27 13:02:46.504] [ion] [debug]   #1 0x5b3b82de38b8
Error: The host pointer of Input buffer __32a6ff3a_1f9b_45fd_a651_29be105e6e36_b00_cab72d90_afd3_4660_85b1_af3d314395e3 is null, but the pipeline will access it on the host.
iitaku commented 1 week ago

This behavior is occured by this scheduling.

In the test code, ion::Buffer's host pointer is set to nullptr due to realize device memory injection, but it enforces unexpected scheduling.