Skip to main content

Api: tracing_scope

Api members in the tracing_scope family.

Member
tracing_scope / f_tracing_scope
tracing_scope_close
tracing_scope_open / f_tracing_scope_open

tracing_scope / f_tracing_scope

fn f_tracing_scope(self) -> Result<TracingScope>
fn tracing_scope(self) -> TracingScope

The tracing scope as a drop guard: this thread records ops symbolically (no kernel runs) until the returned TracingScope drops, which closes the scope on this same thread. Bind it to a named local (let _trace = api.f_tracing_scope()?;): a bare _ pattern drops, and closes, immediately.

tracing_scope_close

fn tracing_scope_close(self, scope: &TracingScope)

Wraps api-table member tracing_scope_close. exit: restores the mode this thread had at open, and frees the handle (NULL is a no-op)

tracing_scope_open / f_tracing_scope_open

fn f_tracing_scope_open(self) -> Result<TracingScope>
fn tracing_scope_open(self) -> TracingScope

Wraps api-table member tracing_scope_open. enter: this thread records ops symbolically and runs no kernel until close; the ops return unscheduled placeholders that tensor_synchronize materializes; close on the SAME thread