Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
sham::gpu_core_timeline_profilier Class Reference

This class implement the GPU core timeline tool from the original algorithm of A. Richermoz, F. Neyret 2024. More...

#include <shambackends/include/shambackends/gpu_core_timeline.hpp>

Classes

struct  acc
 
struct  local_access_t
 

Public Member Functions

 gpu_core_timeline_profilier (const sham::DeviceScheduler_ptr &dev_sched, u32 max_event_count)
 CTOR.
 
bool is_available_on_device ()
 Check if gpu_core_timeline_profilier is available on the device.
 
void setFrameStartClock ()
 Recover the current device time in the frame_start_clock buffer.
 
u64 get_base_clock_value ()
 
acc get_write_access (sham::EventList &deps)
 Get a write access to the timeline events and the event count.
 
void complete_event_state (sycl::event e)
 

Detailed Description

This class implement the GPU core timeline tool from the original algorithm of A. Richermoz, F. Neyret 2024.

This is a utility to profile the execution of kernels on a GPU. It provides an interface to extract the execution timeline of each work-groups.

Note
see the test file gpu_core_timelineTest.cpp for example usage

Definition at line 77 of file gpu_core_timeline.hpp.

Constructor & Destructor Documentation

◆ gpu_core_timeline_profilier()

sham::gpu_core_timeline_profilier::gpu_core_timeline_profilier ( const sham::DeviceScheduler_ptr &  dev_sched,
u32  max_event_count 
)
inline

CTOR.

Definition at line 86 of file gpu_core_timeline.hpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ complete_event_state()

void sham::gpu_core_timeline_profilier::complete_event_state ( sycl::event  e)
inline

Completes the event state of the timeline events and the event count. This function is necessary to ensure that all events are properly registered after a kernel.

Parameters
eThe event to wait on.

Definition at line 302 of file gpu_core_timeline.hpp.

+ Here is the call graph for this function:

◆ get_base_clock_value()

u64 sham::gpu_core_timeline_profilier::get_base_clock_value ( )
inline

Definition at line 158 of file gpu_core_timeline.hpp.

◆ get_write_access()

acc sham::gpu_core_timeline_profilier::get_write_access ( sham::EventList deps)
inline

Get a write access to the timeline events and the event count.

Parameters
depsThe event list to wait on.
Returns
A structure that contains a write access to the timeline events, the write access to the event count and the size of the timeline events.

Definition at line 288 of file gpu_core_timeline.hpp.

+ Here is the call graph for this function:

◆ is_available_on_device()

bool sham::gpu_core_timeline_profilier::is_available_on_device ( )
inline

Check if gpu_core_timeline_profilier is available on the device.

This function checks if the current device supports both sham::intrisics::get_device_clock and sham::intrisics::get_sm_id. If not, a warning message is logged.

This function is lazy, it will only check if the function is available on the first call.

Returns
true if gpu_core_timeline_profilier is available, false otherwise

Definition at line 105 of file gpu_core_timeline.hpp.

+ Here is the call graph for this function:

◆ setFrameStartClock()

void sham::gpu_core_timeline_profilier::setFrameStartClock ( )
inline

Recover the current device time in the frame_start_clock buffer.

Definition at line 143 of file gpu_core_timeline.hpp.

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: