nlcpy.prof.ftrace_region_begin

nlcpy.prof.ftrace_region_begin(message)[source]

Begins an ftrace region.

A file ftrace.out is generated after running your program that invokes this routine. The ftrace.out includes performance information of your program.

Parameters
messagestr

Any string can be specified to distinguish a user-specified region.

See also

ftrace_region

Enables an ftrace region.

ftrace_region_end

Ends an ftrace region.

Note

It is necessary to specify an identical string message to ftrace_region_begin() and ftrace_region_end().

Examples

>>> import nlcpy as vp
>>> x = vp.random.rand(10000, 10000)
>>> vp.prof.ftrace_region_begin('dgemm')
>>> # something you want to profile
>>> _ = x @ x
>>> vp.prof.ftrace_region_end('dgemm')