Refactor Module and Function APIs.
- hipFunction_t is now returned by value. This eliminates dynamic
allocation / memory management complexity in the module. Removed
the kernel
name so the structure is just 16 bytes now.
- Moved the hsa_executable_load_module and hsa_executable_freeze
calls to the hipModuleLoad and hipModuleLoadData calls.
- Apply sharedMemBytes in hipModuleLaunchKernel to group segment
size (not private).
This commit is contained in:
@@ -33,7 +33,7 @@ THE SOFTWARE.
|
||||
|
||||
#include <hip/hcc_detail/host_defines.h>
|
||||
#include <hip/hip_runtime_api.h>
|
||||
//#include "hip/hip_hcc.h"
|
||||
#include <hsa/hsa.h>
|
||||
|
||||
#if defined (__HCC__) && (__hcc_workweek__ < 16155)
|
||||
#error("This version of HIP requires a newer version of HCC.");
|
||||
@@ -72,7 +72,12 @@ typedef struct ihipIpcEventHandle_t *hipIpcEventHandle_t;
|
||||
|
||||
typedef struct ihipModule_t *hipModule_t;
|
||||
|
||||
typedef struct ihipFunction_t *hipFunction_t;
|
||||
struct ihipModuleSymbol_t{
|
||||
hsa_executable_symbol_t _hsaSymbol;
|
||||
uint64_t _object; // The kernel object.
|
||||
};
|
||||
|
||||
typedef struct ihipModuleSymbol_t hipFunction_t;
|
||||
|
||||
typedef void* hipDeviceptr_t;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user