There seems to be something missing in the Driver API when it comes to creating a Module from a fatbin file.
cuModuleLoadFatBinary doesn’t have any options. Less of a problem is that there is no function to load a file in fatbin format, so the programmer has to manually read the file into memory (or use something like boost/interprocessiostreams to memory map the file portably); c++ has no standard library for memory mapped files, unfortunately.
The Toolkit doc says that cuModuleLoadData[Ex] and cuModuleLoadFile accept fatbin format. This begs the question as to whether cuModuleLoadFatBinary is obsolete. If the fatbin format is acceptable, then there’s the same difficulty that in order to provide options, one has to read / map the file into memory and give that image to the API.
I also wonder if any of the options are applicable to fatbin format. Obviously the compile options are N/A. But things like CU_JIT_WALL_TIME, or CU_JIT_TARGET, would be useful. Does the API use CU_JIT_TARGET to select which binary to extract from the fatbin?
A further, minor, question is why there’s no Link function for fatbins. Is this because fatbins are always fully linked and not relocatable? Will cuLinkAddFile/Data accept fatbin format? (see next comment)