ag_forward_profile: Profile the forward pass by stage

View source: R/ag_fwd_profile.R

ag_forward_profileR Documentation

Profile the forward pass by stage

Description

Records where each ag_* operation spends its time on the GPU path: context handling, tensor creation, buffer allocation, operand upload, graph building, compute, and result download.

Usage

ag_forward_profile(on = TRUE)

ag_forward_profile_reset()

ag_forward_profile_report()

Arguments

on

'TRUE' to record, 'FALSE' to stop, 'NA' to query.

Details

The upload and download stages are what a resident forward would remove, so their share is the ceiling for that work – measured rather than estimated.

Value

The previous state, invisibly.


ggmlR documentation built on Oct. 23, 2026, 1:07 a.m.