Ufo.Profiler¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent_instance |
r |
Class Details¶
- class Ufo.Profiler(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Ufo.Profiler
collects and records OpenCL events and stores them in a convenient format on disk or prints summaries on screen.- classmethod new()¶
- Returns:
A new profiler object.
- Return type:
Create a profiler object.
- call(command_queue, kernel, work_dim, global_work_size, local_work_size)¶
- Parameters:
Execute the kernel using the command queue and execution parameters. The event associated with the clEnqueueNDRangeKernel() call is recorded and may be used for profiling purposes later on.
- call_blocking(command_queue, kernel, work_dim, global_work_size, local_work_size)¶
- Parameters:
Execute the kernel using the command queue and execution parameters and wait for the kernel to finish. The event associated with the clEnqueueNDRangeKernel() call is recorded and may be used for profiling purposes later on.
- elapsed(timer)¶
- Parameters:
timer (
Ufo.ProfilerTimer
) – Which timer to start- Returns:
Elapsed time in seconds.
- Return type:
Get the elapsed time in seconds for timer.
- enable_tracing(enable)¶
-
Enable or disable tracing of self. Calls to
Ufo.Profiler.trace_event
() will be ignored if tracing is disabled.
- foreach(func, *user_data)¶
- Parameters:
func (
Ufo.ProfilerFunc
) – The function to be called for an entry
Iterates through the recorded events and calls func on each entry.
- register_event(command_queue, kernel, event)¶
- Parameters:
Register a kernel execution manually
- start(timer)¶
- Parameters:
timer (
Ufo.ProfilerTimer
) – Which timer to start
Start timer. The timer is not reset but accumulates the time elapsed between
Ufo.Profiler.start
() andUfo.Profiler.stop
() calls.
- stop(timer)¶
- Parameters:
timer (
Ufo.ProfilerTimer
) – Which timer to stop
Stop timer. The timer is not reset but accumulates the time elapsed between
Ufo.Profiler.start
() andUfo.Profiler.stop
() calls.
- trace_event(type)¶
- Parameters:
type (
Ufo.TraceEventType
) – trav event type
Register a new trace event. The given event type, the thread id and the global time is stored when this function is called.