diff options
| author | Mengchi Zhang <[email protected]> | 2019-06-06 12:17:13 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2019-06-06 12:17:13 -0400 |
| commit | 9d6f9463769908755174c7b84b5720dc9cd24e42 (patch) | |
| tree | be94abc013ae8fe5a934d02550feae6a3ff397c3 /libcuda/gpgpu_context.h | |
| parent | 5a794ee6bf694a1a0abfc8d1bc270cbeb135e76f (diff) | |
| parent | bc8d1e10507f043c916ee051dc9a687adc6d9b4b (diff) | |
Merge pull request #10 from echoedit/dev
Dev
Diffstat (limited to 'libcuda/gpgpu_context.h')
| -rw-r--r-- | libcuda/gpgpu_context.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/libcuda/gpgpu_context.h b/libcuda/gpgpu_context.h index d6e564b..f29e2e0 100644 --- a/libcuda/gpgpu_context.h +++ b/libcuda/gpgpu_context.h @@ -1,18 +1,50 @@ +#ifndef __gpgpu_context_h__ +#define __gpgpu_context_h__ #include <list> +#include <map> +#include <set> +#include <string> +#include "cuda_api_object.h" class cuobjdumpSection; class cuobjdumpELFSection; class cuobjdumpPTXSection; +class symbol_table; +class gpgpu_ptx_sim_arg; +class kernel_info_t; + +typedef std::list<gpgpu_ptx_sim_arg> gpgpu_ptx_sim_arg_list_t; class gpgpu_context { public: + gpgpu_context() { + api = new cuda_runtime_api(); + } + // global list std::list<cuobjdumpSection*> cuobjdumpSectionList; + std::map<int, bool>fatbin_registered; + std::map<int, std::string> fatbinmap; + std::map<std::string, symbol_table*> name_symtab; + std::map<unsigned long long, size_t> g_mallocPtr_Size; + //maps sm version number to set of filenames + std::map<unsigned, std::set<std::string> > version_filename; + cuda_runtime_api* api; + // member function list void cuobjdumpInit(); void cuobjdumpParseBinary(unsigned int handle); void extract_code_using_cuobjdump(); std::list<cuobjdumpSection*> pruneSectionList(CUctx_st *context); std::list<cuobjdumpSection*> mergeMatchingSections(std::string identifier); std::list<cuobjdumpSection*> mergeSections(); - cuobjdumpELFSection* findELFSection(const std::string identifier, std::list<cuobjdumpSection*> &libSectionList); - cuobjdumpPTXSection* findPTXSection(const std::string identifier, std::list<cuobjdumpSection*> &libSectionList); + cuobjdumpELFSection* findELFSection(const std::string identifier); + cuobjdumpPTXSection* findPTXSection(const std::string identifier); + void extract_ptx_files_using_cuobjdump(CUctx_st *context); + void cuobjdumpRegisterFatBinary(unsigned int handle, const char* filename, CUctx_st *context); + kernel_info_t *gpgpu_cuda_ptx_sim_init_grid( const char *kernel_key, + gpgpu_ptx_sim_arg_list_t args, + struct dim3 gridDim, + struct dim3 blockDim, + struct CUctx_st* context ); + }; +#endif /* __gpgpu_context_h__ */ |
