GTPin: GTReplay: Callback Registration

GTPin

- Main Page
- Related Pages
- Modules
- Data Structures

Typedefs | Functions
GTReplay: Callback Registration

Prototypes of GTReplay callbacks and callback registration APIs More...

## Typedefs
typedef void(* | GTReplayOnKernelBuildCallbackFunc )(GTReplayKernel kernel)
typedef void(* | GTReplayOnKernelCompleteCallbackFunc )(GTReplayKernel kernel)
typedef void(* | GTReplayOnKernelEventCallbackFunc )(void *)
typedef void(* | GTReplayOnSwThreadEventCallbackFunc )(uint32_t tileId, uint32_t tid, GTReplayState state, void *)
typedef void(* | GTReplayInstrumentationCallbackFunc )(uint32_t tileId, uint32_t tid, GTReplayIns ins, GTReplayState state, void *)
## Functions
GTREPLAY_API void | GTReplay_RegisterOnKernelBuildCallback (GTReplayOnKernelBuildCallbackFunc func)
GTREPLAY_API void | GTReplay_RegisterOnKernelCompleteCallback (GTReplayOnKernelCompleteCallbackFunc func)
GTREPLAY_API void | GTReplay_RegisterOnKernelBeginCallback (GTReplayKernel kernel, GTReplayOnKernelEventCallbackFunc func, void *data)
GTREPLAY_API void | GTReplay_RegisterOnKernelEndCallback (GTReplayKernel kernel, GTReplayOnKernelEventCallbackFunc func, void *data)
GTREPLAY_API void | GTReplay_RegisterCallbackKernelBegin (GTReplayKernel kernel, GTReplayOnKernelEventCallbackFunc func, void *data)
GTREPLAY_API void | GTReplay_RegisterCallbackOnKernelEnd (GTReplayKernel kernel, GTReplayOnKernelEventCallbackFunc func, void *data)
GTREPLAY_API void | GTReplay_RegisterCallbackOnSwThreadBegin (GTReplayKernel kernel, GTReplayOnSwThreadEventCallbackFunc func, void *data)
GTREPLAY_API void | GTReplay_RegisterCallbackOnSwThreadEnd (GTReplayKernel kernel, GTReplayOnSwThreadEventCallbackFunc func, void *data)
GTREPLAY_API void | GTReplay_RegisterCallbackBeforeIns (GTReplayKernel kernel, GTReplayIns ins, GTReplayInstrumentationCallbackFunc func, void *data)
GTREPLAY_API void | GTReplay_RegisterCallbackAfterIns (GTReplayKernel kernel, GTReplayIns ins, GTReplayInstrumentationCallbackFunc func, void *data)

## Detailed Description

Prototypes of GTReplay callbacks and callback registration APIs

## Typedef Documentation

GTReplayInstrumentationCallbackFunc

callback function invoked before or after any instruction of the kernel

GTReplayOnKernelBuildCallbackFunc

callback function invoked during kernel compilation

GTReplayOnKernelCompleteCallbackFunc

callback function invoked after kernel completes its execution

GTReplayOnKernelEventCallbackFunc

callback function invoked before the kernel begins running or after the kernel ends

GTReplayOnSwThreadEventCallbackFunc

callback function invoked before a kernel instance (SW thread) is dispatched to any of HW threads or after it ends

## Function Documentation

GTREPLAY_API void GTReplay_RegisterCallbackAfterIns | ( | GTReplayKernel | kernel,
|  | GTReplayIns | ins,
|  | GTReplayInstrumentationCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked after a given instruction of a given kernel

Parameters:

  [in] | kernel | a kernel handle
  [in] | ins | an instruction handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

GTREPLAY_API void GTReplay_RegisterCallbackBeforeIns | ( | GTReplayKernel | kernel,
|  | GTReplayIns | ins,
|  | GTReplayInstrumentationCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked before a given instruction of a given kernel

Parameters:

  [in] | kernel | a kernel handle
  [in] | ins | an instruction handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

GTREPLAY_API void GTReplay_RegisterCallbackKernelBegin | ( | GTReplayKernel | kernel,
|  | GTReplayOnKernelEventCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked before a given kernel begins

Parameters:

  [in] | kernel | a kernel handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

GTREPLAY_API void GTReplay_RegisterCallbackOnKernelEnd | ( | GTReplayKernel | kernel,
|  | GTReplayOnKernelEventCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked after a given kernel ends

Parameters:

  [in] | kernel | a kernel handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

GTREPLAY_API void GTReplay_RegisterCallbackOnSwThreadBegin | ( | GTReplayKernel | kernel,
|  | GTReplayOnSwThreadEventCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked before any SW thread (dispatch) of a given kernel begins

Parameters:

  [in] | kernel | a kernel handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

GTREPLAY_API void GTReplay_RegisterCallbackOnSwThreadEnd | ( | GTReplayKernel | kernel,
|  | GTReplayOnSwThreadEventCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked after any SW thread (dispatch) of a given kernel ends

Parameters:

  [in] | kernel | a kernel handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

GTREPLAY_API void GTReplay_RegisterOnKernelBeginCallback | ( | GTReplayKernel | kernel,
|  | GTReplayOnKernelEventCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked before GTReplay begins execution of a specific kernel

Parameters:

  [in] | kernel | a kernel handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

GTREPLAY_API void GTReplay_RegisterOnKernelBuildCallback | ( | GTReplayOnKernelBuildCallbackFunc | func | ) |

Register a callback that will be invoked before GTReplay builds any kernel

Parameters:

  [in] | func | the function to be invoked

GTREPLAY_API void GTReplay_RegisterOnKernelCompleteCallback | ( | GTReplayOnKernelCompleteCallbackFunc | func | ) |

Register a callback that will be invoked after any kernel was completed

Parameters:

  [in] | func | the function to be invoked

GTREPLAY_API void GTReplay_RegisterOnKernelEndCallback | ( | GTReplayKernel | kernel,
|  | GTReplayOnKernelEventCallbackFunc | func,
|  | void * | data
| ) |  |

Register a callback that will be invoked after GTReplay ends execution of a specific kernel

Parameters:

  [in] | kernel | a kernel handle
  [in] | func | the function to be invoked
  [in] | data | additional arg

All Data Structures Functions Variables Typedefs Enumerations Enumerator

      Copyright (C) 2013-2025 Intel Corporation

      SPDX-License-Identifier: MIT