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

CpuMath Enhancement: Add Debug.Assert to check matching lengths of arguments to SSE/AVX intrinsics #828

Open
briancylui opened this issue Sep 5, 2018 · 1 comment
Labels
P2 Priority of the issue for triage purpose: Needs to be fixed at some point. up-for-grabs A good issue to fix if you are trying to contribute to the project

Comments

@briancylui
Copy link
Contributor

briancylui commented Sep 5, 2018

Style changes needed to solve part of #823

Details

  • In src\Microsoft.ML.CpuMath\SseIntrinsics.cs, it may make sense to add some Debug.Asserts to check the src and dst Lengths match. However, these are internal functions that are only called from functions that guarantee the arguments are checked, so it might not be a blocking issue. It just may be some nice documentation on the expectations of these methods. And in case they get new callsites in the future.
@briancylui briancylui changed the title Add Debug.Assert to check matching lengths of arguments to SSE/AVX intrinsics CpuMath Enhancement: Add Debug.Assert to check matching lengths of arguments to SSE/AVX intrinsics Sep 6, 2018
@danmoseley danmoseley added the up-for-grabs A good issue to fix if you are trying to contribute to the project label Nov 2, 2018
@TomFinley
Copy link
Contributor

However, these are internal functions that are only called from functions that guarantee the arguments are checked, so it might not be a blocking issue.

This is not a reason not to do it. Asserts are only called from debug anyway, so there is no question of them having user facing impact. They are for detecting whether we have bugs internally. (If there were any chance of them being called outside they should be checks.)

@harishsk harishsk added the P2 Priority of the issue for triage purpose: Needs to be fixed at some point. label Jan 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 Priority of the issue for triage purpose: Needs to be fixed at some point. up-for-grabs A good issue to fix if you are trying to contribute to the project
Projects
None yet
Development

No branches or pull requests

4 participants