Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation #2146

Merged
merged 9 commits into from
Nov 3, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix profiler invocation in toplevel scope.
  • Loading branch information
maleadt committed Nov 3, 2023
commit 3d3c7537d158501e784f71226f7bc3c113d18fc2
6 changes: 2 additions & 4 deletions src/profile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -249,17 +249,15 @@ function emit_integrated_profile(code, kwargs)

# sink the initial profiler overhead into a synchronization call
CUDA.cuCtxSynchronize()
rv = nothing
data = nothing
try
rv = $(esc(code))
$(esc(code))

# synchronize to ensure we capture all activity
CUDA.cuCtxSynchronize()
finally
CUPTI.disable!(cfg)
data = $Profile.capture(cfg)
end
data = $Profile.capture(cfg)
$ProfileResults(; data..., $(map(esc, kwargs)...))
end
end
Expand Down