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

misc: Prevent builtins on transient functions #2506

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

FabioLuporini
Copy link
Contributor

No description provided.

@FabioLuporini FabioLuporini added the bug-C-minor bug in the generated code not affecting correctness label Dec 20, 2024
@wraps(func)
def wrapper(*args, **kwargs):
for i in args:
try:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should only be an issue on Device platform, CPU transient do hold the data

@@ -131,3 +132,23 @@ def wrapper(*args, **kwargs):
return func(*processed, argmap=argmap, **kwargs)

return wrapper


def check_args(func):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check_builtins_args

@@ -518,3 +518,11 @@ def test_issue_1863(self):
assert type(v1) is np.int32
assert type(v2) is np.float32
assert type(v3) is np.float64

def test_is_transient(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mark device

Copy link

codecov bot commented Dec 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.11%. Comparing base (cc04242) to head (75c9f2e).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2506      +/-   ##
==========================================
- Coverage   87.29%   87.11%   -0.18%     
==========================================
  Files         238      238              
  Lines       45609    45634      +25     
  Branches     4042     4043       +1     
==========================================
- Hits        39814    39756      -58     
- Misses       5112     5201      +89     
+ Partials      683      677       -6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-C-minor bug in the generated code not affecting correctness
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants