comparison src/gpu/ptx/vm/gpu_ptx.hpp @ 12371:e32f2b195867

Merge
author Christos Kotselidis <christos.kotselidis@oracle.com>
date Fri, 11 Oct 2013 17:21:14 +0200
parents c7abc8411011
children 1a7e7011a341
comparison
equal deleted inserted replaced
12370:1e4d1c150ed5 12371:e32f2b195867
29 * Some useful macro definitions from publicly available cuda.h. 29 * Some useful macro definitions from publicly available cuda.h.
30 * These definitions are for convenience. 30 * These definitions are for convenience.
31 */ 31 */
32 #define GRAAL_CUDA_SUCCESS 0 32 #define GRAAL_CUDA_SUCCESS 0
33 /**< Device shares a unified address space with the host */ 33 /**< Device shares a unified address space with the host */
34 #define GRAAL_CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK 1
34 #define GRAAL_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING 41 35 #define GRAAL_CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING 41
35 #define GRAAL_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR 75 36 #define GRAAL_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR 75
36 #define GRAAL_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR 76 37 #define GRAAL_CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR 76
38 #define GRAAL_CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT 16
39 #define GRAAL_CU_DEVICE_ATTRIBUTE_WARP_SIZE 10
40 #define GRAAL_CU_DEVICE_ATTRIBUTE_CAN_MAP_HOST_MEMORY 19
41 #define GRAAL_CU_DEVICE_ATTRIBUTE_CONCURRENT_KERNELS 31
42 #define GRAAL_CU_DEVICE_ATTRIBUTE_ASYNC_ENGINE_COUNT 40
37 #define GRAAL_CU_JIT_MAX_REGISTERS 0 43 #define GRAAL_CU_JIT_MAX_REGISTERS 0
38 #define GRAAL_CU_JIT_THREADS_PER_BLOCK 1 44 #define GRAAL_CU_JIT_THREADS_PER_BLOCK 1
39 #define GRAAL_CU_JIT_INFO_LOG_BUFFER 3 45 #define GRAAL_CU_JIT_INFO_LOG_BUFFER 3
40 #define GRAAL_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES 4 46 #define GRAAL_CU_JIT_INFO_LOG_BUFFER_SIZE_BYTES 4
41 #define GRAAL_CUDA_ERROR_NO_BINARY_FOR_GPU 209 47 #define GRAAL_CUDA_ERROR_NO_BINARY_FOR_GPU 209
71 friend class gpu; 77 friend class gpu;
72 78
73 protected: 79 protected:
74 static bool probe_linkage(); 80 static bool probe_linkage();
75 static bool initialize_gpu(); 81 static bool initialize_gpu();
82 static unsigned int total_cores();
76 static void * generate_kernel(unsigned char *code, int code_len, const char *name); 83 static void * generate_kernel(unsigned char *code, int code_len, const char *name);
84 static bool execute_warp(int dimX, int dimY, int dimZ, address kernel, PTXKernelArguments & ka, JavaValue &ret);
77 static bool execute_kernel(address kernel, PTXKernelArguments & ka, JavaValue &ret); 85 static bool execute_kernel(address kernel, PTXKernelArguments & ka, JavaValue &ret);
78 public: 86 public:
79 #if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64) 87 #if defined(__x86_64) || defined(AMD64) || defined(_M_AMD64)
80 typedef unsigned long long CUdeviceptr; 88 typedef unsigned long long CUdeviceptr;
81 #else 89 #else