Skip to content

Commit

Permalink
add missing entry (#274)
Browse files Browse the repository at this point in the history
Co-authored-by: Thomas Applencourt <[email protected]>
  • Loading branch information
TApplencourt and Thomas Applencourt authored Jul 30, 2024
1 parent 613eb33 commit 726a7bc
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 7 deletions.
51 changes: 51 additions & 0 deletions cuda/btx_cudainterval_callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,52 @@ static void entries_traffic_v1_callback(void *btx_handle, void *usr_data,
hostname, vpid, vtid, static_cast<size_t>(size));
}

static void entries_traffic_2d_callback(void *btx_handle, void *usr_data,
int64_t ts,
const char *event_class_name,
const char *hostname, int64_t vpid,
uint64_t vtid, CUDA_MEMCPY2D* pCopy_val) {
entries_traffic_v2_callback(btx_handle, usr_data, ts, event_class_name,
hostname, vpid, vtid, static_cast<size_t>(pCopy_val->WidthInBytes*pCopy_val->Height));
}

static void entries_traffic_2d_v1_callback(void *btx_handle, void *usr_data,
int64_t ts,
const char *event_class_name,
const char *hostname, int64_t vpid,
uint64_t vtid, CUDA_MEMCPY2D_v1* pCopy_val) {
entries_traffic_v2_callback(btx_handle, usr_data, ts, event_class_name,
hostname, vpid, vtid, static_cast<size_t>(pCopy_val->WidthInBytes*pCopy_val->Height));
}

static void entries_traffic_3d_callback(void *btx_handle, void *usr_data,
int64_t ts,
const char *event_class_name,
const char *hostname, int64_t vpid,
uint64_t vtid, CUDA_MEMCPY3D* pCopy_val) {
entries_traffic_v2_callback(btx_handle, usr_data, ts, event_class_name,
hostname, vpid, vtid, static_cast<size_t>(pCopy_val->WidthInBytes*pCopy_val->Height*pCopy_val->Depth));
}

static void entries_traffic_3d_v1_callback(void *btx_handle, void *usr_data,
int64_t ts,
const char *event_class_name,
const char *hostname, int64_t vpid,
uint64_t vtid, CUDA_MEMCPY3D_v1* pCopy_val) {
entries_traffic_v2_callback(btx_handle, usr_data, ts, event_class_name,
hostname, vpid, vtid, static_cast<size_t>(pCopy_val->WidthInBytes*pCopy_val->Height*pCopy_val->Depth));
}

static void entries_traffic_3d_peer_callback(void *btx_handle, void *usr_data,
int64_t ts,
const char *event_class_name,
const char *hostname, int64_t vpid,
uint64_t vtid, CUDA_MEMCPY3D_PEER* pCopy_val) {
entries_traffic_v2_callback(btx_handle, usr_data, ts, event_class_name,
hostname, vpid, vtid, static_cast<size_t>(pCopy_val->WidthInBytes*pCopy_val->Height*pCopy_val->Depth));
}


static void exits_traffic_callback(void *btx_handle, void *usr_data, int64_t ts,
const char *event_class_name,
const char *hostname, int64_t vpid,
Expand Down Expand Up @@ -344,6 +390,11 @@ void btx_register_usr_callbacks(void *btx_handle) {
// Traffic
REGISTER_ASSOCIATED_CALLBACK(entries_traffic_v1);
REGISTER_ASSOCIATED_CALLBACK(entries_traffic_v2);
REGISTER_ASSOCIATED_CALLBACK(entries_traffic_2d);
REGISTER_ASSOCIATED_CALLBACK(entries_traffic_2d_v1);
REGISTER_ASSOCIATED_CALLBACK(entries_traffic_3d);
REGISTER_ASSOCIATED_CALLBACK(entries_traffic_3d_v1);
REGISTER_ASSOCIATED_CALLBACK(entries_traffic_3d_peer);
REGISTER_ASSOCIATED_CALLBACK(exits_traffic);

// device profiling events
Expand Down
54 changes: 47 additions & 7 deletions cuda/btx_cudamatching_model.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
:cast_type: ^CUresult$

- :set_id: exits_cudaError_absent
:domain: exits - exits_cudaError_present
:domain: exits - exits_cudaError_present

# Memory traffic
- :set_id: traffic
Expand All @@ -65,6 +65,46 @@
:type: structure
:members:
- :name: ^ByteCount$
- :set_id: entries_traffic_2d
:domain: entries_traffic
:payload_field_class:
:type: structure
:members:
- :name: ^pCopy_val$
:field_class:
:cast_type: ^CUDA_MEMCPY2D \*$
- :set_id: entries_traffic_2d_v1
:domain: entries_traffic
:payload_field_class:
:type: structure
:members:
- :name: ^pCopy_val$
:field_class:
:cast_type: ^CUDA_MEMCPY2D_v1 \*$
- :set_id: entries_traffic_3d
:domain: entries_traffic
:payload_field_class:
:type: structure
:members:
- :name: ^pCopy_val$
:field_class:
:cast_type: ^CUDA_MEMCPY3D \*$
- :set_id: entries_traffic_3d_v1
:domain: entries_traffic
:payload_field_class:
:type: structure
:members:
- :name: ^pCopy_val$
:field_class:
:cast_type: ^CUDA_MEMCPY3D_v1 \*$
- :set_id: entries_traffic_3d_peer
:domain: entries_traffic
:payload_field_class:
:type: structure
:members:
- :name: ^pCopy_val$
:field_class:
:cast_type: ^CUDA_MEMCPY3D_PEER \*$
- :set_id: exits_traffic
:domain: exits & traffic
:payload_field_class:
Expand All @@ -89,7 +129,7 @@
:members:
- :name: ^cuResult$
- :name: ^pctx_val$

- :set_id: ctx_destroy
:name: "cuCtxDestroy"
:register: false
Expand All @@ -105,7 +145,7 @@
:type: structure
:members:
- :name: ^cuResult$

# Context stack management
- :set_id: ctx_set_current
:name: "cuCtxSetCurrent"
Expand All @@ -122,7 +162,7 @@
:type: structure
:members:
- :name: ^cuResult$

- :set_id: ctx_push_current
:name: "cuCtxPushCurrent"
:register: false
Expand All @@ -138,7 +178,7 @@
:type: structure
:members:
- :name: ^cuResult$

- :set_id: ctx_pop_current
:name: "cuCtxPopCurrent"
:register: false
Expand All @@ -151,7 +191,7 @@
:members:
- :name: ^cuResult$
- :name: ^pctx_val$

# Device primary context management
- :set_id: primary_ctx_retain
:name: "cuDevicePrimaryCtxRetain"
Expand All @@ -169,7 +209,7 @@
:members:
- :name: ^cuResult$
- :name: ^pctx_val$

# Stream create
- :set_id: stream_create
:name: "cuStreamCreate"
Expand Down

0 comments on commit 726a7bc

Please sign in to comment.