Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
3 changes: 3 additions & 0 deletions cunumeric/coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from typing import Any, Container, Mapping, Optional, cast

import numpy as np
from legate.core import track_provenance
from typing_extensions import Protocol

from .runtime import runtime
Expand Down Expand Up @@ -92,6 +93,7 @@ def implemented(
if reporting:

@wraps(func)
@track_provenance(runtime.legate_context, nested=True)
def wrapper(*args: Any, **kwargs: Any) -> Any:
location = find_last_user_frames(
not runtime.args.report_dump_callstack
Expand All @@ -106,6 +108,7 @@ def wrapper(*args: Any, **kwargs: Any) -> Any:
else:

@wraps(func)
@track_provenance(runtime.legate_context, nested=True)
def wrapper(*args: Any, **kwargs: Any) -> Any:
return func(*args, **kwargs)

Expand Down
3 changes: 2 additions & 1 deletion cunumeric/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def find_last_user_frames(top_only: bool = True) -> str:
for (last, _) in traceback.walk_stack(None):
if "__name__" not in last.f_globals:
continue
if not last.f_globals["__name__"].startswith("cunumeric"):
name = last.f_globals["__name__"]
if not any(name.startswith(pkg) for pkg in ("cunumeric", "legate")):
break

if top_only:
Expand Down