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

compiler: Fix min/max reductions to be backend-portable #2315

Merged
merged 1 commit into from
Feb 14, 2024

Conversation

FabioLuporini
Copy link
Contributor

No description provided.

@FabioLuporini FabioLuporini added the bug-C bug in the generated code label Feb 14, 2024
Copy link

codecov bot commented Feb 14, 2024

Codecov Report

Attention: 7 lines in your changes are missing coverage. Please review.

Comparison is base (1428bbc) 86.69% compared to head (3e504f9) 86.69%.

Files Patch % Lines
devito/ir/clusters/algorithms.py 94.44% 0 Missing and 2 partials ⚠️
devito/passes/iet/misc.py 77.77% 1 Missing and 1 partial ⚠️
tests/test_dle.py 89.47% 1 Missing and 1 partial ⚠️
devito/symbolics/extended_sympy.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2315   +/-   ##
=======================================
  Coverage   86.69%   86.69%           
=======================================
  Files         229      229           
  Lines       42983    43043   +60     
  Branches     7967     7983   +16     
=======================================
+ Hits        37262    37318   +56     
- Misses       5033     5034    +1     
- Partials      688      691    +3     

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

ispce = cluster.ispace.project(lambda i: i not in dims)
init.append(cluster.rebuild(exprs=expr, ispace=ispce))

processed.append(e.func(lhs, Max(lhs, rhs)))
Copy link
Contributor

Choose a reason for hiding this comment

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

bit of redundance but it's fine,

Copy link
Contributor Author

@FabioLuporini FabioLuporini Feb 14, 2024

Choose a reason for hiding this comment

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

thought about factoring some code out but honestly it doesn't get better imho

limits = FindApplications(ValueLimit).visit(iet)
includes = set()
if limits & (set(limits_mapper[np.int32]) | set(limits_mapper[np.int64])):
includes.add('limits.h')
Copy link
Contributor

Choose a reason for hiding this comment

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

Note: I remember this one being a pain because it's in two different places in the nvidia SDK and one of them is broken

Copy link
Contributor Author

Choose a reason for hiding this comment

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

interesting. For me CUDA and OpenACC are compiling fine, let's see if/when an issue pops up

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it was popping up when I was trying to install cupy that was finding weird headers can't remember exactly but I know I had issues with it

@mloubout mloubout merged commit 747c0fe into master Feb 14, 2024
31 checks passed
@mloubout mloubout deleted the patch-delta-compr-2 branch February 14, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-C bug in the generated code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants