Compiles source code and loads the generated .so file. Returns a tuple of DLLWrapper, hash_key, source_code_path
(cls, source_code, dst_file_ext)
| 2253 | |
| 2254 | @classmethod |
| 2255 | def load(cls, source_code, dst_file_ext) -> Tuple[DLLWrapper, str, str]: |
| 2256 | """ |
| 2257 | Compiles source code and loads the generated .so file. |
| 2258 | Returns a tuple of DLLWrapper, hash_key, source_code_path |
| 2259 | """ |
| 2260 | |
| 2261 | if dst_file_ext != "so": |
| 2262 | raise RuntimeError( |
| 2263 | f"Only support loading a .so file for now. " |
| 2264 | f"Requested file extension: {dst_file_ext}. Source code: {source_code}" |
| 2265 | ) |
| 2266 | dst_file_path, hash_key, source_code_path = cls.compile( |
| 2267 | source_code, dst_file_ext |
| 2268 | ) |
| 2269 | return (DLLWrapper(dst_file_path), hash_key, source_code_path) |
| 2270 | |
| 2271 | |
| 2272 | def caching_device_properties(): |
nothing calls this directly
no test coverage detected