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).


[ROCm/hip commit: 4d29885be3]
This commit is contained in:
Ben Sander
2016-12-17 07:19:22 -06:00
parent ae83f93ba4
commit 7402308098
4 ha cambiato i file con 52 aggiunte e 65 eliminazioni
@@ -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;