OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

vt_cupti_activity.h
1 /**
2 * VampirTrace
3 * http://www.tu-dresden.de/zih/vampirtrace
4 *
5 * Copyright (c) 2005-2012, ZIH, TU Dresden, Federal Republic of Germany
6 *
7 * Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
8 * Centre, Federal Republic of Germany
9 *
10 * See the file COPYING in the package base directory for details
11 **/
12
13 #ifndef VT_CUPTI_ACTIVITY_H
14 #define VT_CUPTI_ACTIVITY_H
15
16 #ifdef __cplusplus
17 # define EXTERN extern "C"
18 #else
19 # define EXTERN extern
20 #endif
21
22 /*
23 * Initialize the VampirTrace CUPTI Activity implementation.
24 */
25 EXTERN void vt_cupti_activity_init(void);
26
27 /*
28 * Finalize the VampirTrace CUPTI Activity implementation.
29 */
30 EXTERN void vt_cupti_activity_finalize(void);
31
32 /*
33 * Create and add a new context to list of contexts.
34 *
35 * @param cuCtx the CUDA context, specifying the queue
36 */
37 EXTERN void vt_cuptiact_addContext(CUcontext cuCtx, CUdevice cuDev);
38
39 /*
40 * Handle activities buffered by CUPTI.
41 *
42 * NVIDIA:
43 * "Global Queue: The global queue collects all activity records that
44 * are not associated with a valid context. All API activity records
45 * are collected in the global queue. A buffer is enqueued in the
46 * global queue by specifying \p context == NULL.
47 *
48 * Context Queue: Each context queue collects activity records
49 * associated with that context that are not associated with a
50 * specific stream or that are associated with the default stream
51 * (stream ID 0). A buffer is enqueued in a context queue by
52 * specifying the context and a stream ID of 0.
53 *
54 * Stream Queue: Each stream queue collects memcpy, memset, and kernel
55 * activity records associated with the stream. A buffer is enqueued
56 * in a stream queue by specifying a context and a non-zero stream ID."
57 *
58 * @param cuCtx CUDA context, NULL to handle globally buffered activities
59 */
60 EXTERN void vt_cuptiact_flushCtxActivities(CUcontext cuCtx);
61
62
63 EXTERN void vt_cuptiact_writeMalloc(uint32_t ctxID, CUcontext cuCtx,
64 void *devPtr, size_t size);
65
66 EXTERN void vt_cuptiact_writeFree(uint32_t ctxID, CUcontext cuCtx,
67 void *devPtr);
68
69 /*
70 * To provide correlation data between API call and activity.
71 *
72 * @param ctxID the CUDA context identifier
73 * @param correlationID correlation between memory copy and API call
74 */
75 EXTERN void vt_cuptiact_addCorrelation(uint32_t ctxID, uint32_t correlationID,
76 uint32_t ptid);
77
78
79 #endif /* VT_CUPTI_ACTIVITY_H */
80
vtcuptiactctx_st::cuCtx
CUcontext cuCtx
CUDA context handle.
Definition: vt_cupti_activity.c:93
vtcuptiactctx_st::cuDev
CUdevice cuDev
CUDA device handle.
Definition: vt_cupti_activity.c:95
vtcuptiactctx_st::ptid
uint32_t ptid
VampirTrace process/thread.
Definition: vt_cupti_activity.c:96
vtcuptiactctx_st::ctxID
uint32_t ctxID
context ID
Definition: vt_cupti_activity.c:92