New Issue: Have "gpu kernel launch" primitive take Chapel function directly

17997, "stonea", "Have "gpu kernel launch" primitive take Chapel function directly", "2021-06-28T18:27:30Z"

We currently have a test that uses a primitive to launch a GPU kernel:

Specifically this line:

__primitive("gpu kernel launch", funcPtr, 1, 1, 1, 1, 1, 1, 0, 0, kernelParams, 0);

Right now we're passing a functPtr to this primitive that is createFunction.

A next step I could do to make this example more ideal would be to:

  • Move the createFunction() function into the Chapel runtime library.
    • Have it take in a string for the kernel function to load
    • For now we can can have it hard-coded to expect tmp/chpl__gpu.fatbin to exist
  • Modify the primitive to be passed in a chapel function
  • Lower the primitive to call the runtime library function to get the actual function pointer.