Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 90 lines (83 sloc) 3.396 kb
479e9e7 recommit the project
Shinpei Kato authored
1 /*
2 * Copyright 2011 Shinpei Kato
3 * All Rights Reserved.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
14 * Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 */
24
25 #ifndef __GDEV_NVIDIA_DEF_H__
26 #define __GDEV_NVIDIA_DEF_H__
27
a2a0c00 cuda: remove gsync() from cuLaunchGrid() and newly implemented cuCtxS…
Shinpei Kato authored
28 #include "gdev_list.h"
479e9e7 recommit the project
Shinpei Kato authored
29 #ifdef __KERNEL__
30 #include <linux/types.h>
31 #else
32 #include <stdint.h>
33 #endif
34
35 /**
d2a083c gdev: changed list operation interface
Shinpei Kato authored
36 * static numbers for nvidia GPUs.
37 */
dbe61d2 cuda: fixed the size of constant memory segments from 16 to 32
Shinpei Kato authored
38 #define GDEV_NVIDIA_CONST_SEGMENT_MAX_COUNT 32 /* by definition? */
d2a083c gdev: changed list operation interface
Shinpei Kato authored
39
40 /**
ebea741 gdev: added /proc entries
Shinpei Kato authored
41 * query values for the device-specific information.
d799917 cuda: fixed cuDeviceTotalMem()
Shinpei Kato authored
42 * they should be >= 0x100.
479e9e7 recommit the project
Shinpei Kato authored
43 */
d799917 cuda: fixed cuDeviceTotalMem()
Shinpei Kato authored
44 #define GDEV_NVIDIA_QUERY_MP_COUNT 0x100
45 #define GDEV_NVIDIA_QUERY_DEVICE_MEM_SIZE 0x101
46 #define GDEV_NVIDIA_QUERY_DMA_MEM_SIZE 0x102
47 #define GDEV_NVIDIA_QUERY_CHIPSET 0x103
479e9e7 recommit the project
Shinpei Kato authored
48
49 /**
50 * GPGPU kernel object struct:
51 * we use the same kernel struct between user-space and kernel-space.
52 *
53 * if you want to know how NVIDIA GPGPU kernels work, please reference
54 * the NVIDIA docs and/or the PSCNV wiki available at:
55 * https://github.com/pathscale/pscnv/wiki/Nvidia_Compute
56 */
57 struct gdev_kernel {
5e59cdb gdev/bench/cuda/test: minor fixes
Shinpei Kato authored
58 uint64_t code_addr; /* code address in VAS */
180bc32 cuda: implemented module and context management
Shinpei Kato authored
59 uint32_t code_size; /* code size */
5e59cdb gdev/bench/cuda/test: minor fixes
Shinpei Kato authored
60 uint32_t code_pc; /* initial program counter */
d2a083c gdev: changed list operation interface
Shinpei Kato authored
61 struct gdev_cmem {
62 uint64_t addr; /* constant memory address in VAS */
63 uint32_t size; /* constant memory size */
64 uint32_t offset; /* offset in constant memory */
65 } cmem[GDEV_NVIDIA_CONST_SEGMENT_MAX_COUNT];
66 uint32_t cmem_count; /* constant memory count */
928bfea gdev: retrieved param_buf member in struct gdev_kernel
Shinpei Kato authored
67 uint32_t param_size; /* kernel parameter size */
68 uint32_t *param_buf; /* kernel parameter buffer */
479e9e7 recommit the project
Shinpei Kato authored
69 uint64_t lmem_addr; /* local memory address in VAS */
70 uint64_t lmem_size_total; /* local memory size for all threads */
5e59cdb gdev/bench/cuda/test: minor fixes
Shinpei Kato authored
71 uint32_t lmem_size; /* local memory size per thread (l[positive]) */
72 uint32_t lmem_size_neg; /* local memory size per thread (l[negaive]) */
73 uint32_t lmem_base; /* $lbase */
74 uint32_t smem_size; /* shared memory size */
75 uint32_t smem_base; /* $sbase */
76 uint32_t warp_stack_size; /* warp stack size */
77 uint32_t warp_lmem_size; /* total warp memory size */
479e9e7 recommit the project
Shinpei Kato authored
78 uint32_t reg_count; /* register count */
79 uint32_t bar_count; /* barrier count */
80 uint32_t grid_id; /* grid ID */
5e59cdb gdev/bench/cuda/test: minor fixes
Shinpei Kato authored
81 uint32_t grid_x; /* grid dimension X */
82 uint32_t grid_y; /* grid dimension Y */
83 uint32_t grid_z; /* grid dimension Z */
84 uint32_t block_x; /* block dimension X */
85 uint32_t block_y; /* block dimension Y */
86 uint32_t block_z; /* block dimension Z */
479e9e7 recommit the project
Shinpei Kato authored
87 };
88
89 #endif
Something went wrong with that request. Please try again.