I assume this is a question about native CUDA kernels? (Means module A is not part of an OptixPipeline.)
In that case I would ask this question on the CUDA Programing and Performance sub-forum.
Searching there for “function pointer” turned up some related threads.
This looks like exactly the same question. Post 17 to the end maybe interesting:
https://forums.developer.nvidia.com/t/how-can-i-use-device-function-pointer-in-cuda/14405/20
This post explains important restrictions:
https://forums.developer.nvidia.com/t/consistency-of-functions-pointer/29325/6
Maybe that helps. The above posts are pretty old and I would recommend to read some more.