oneDAL icon indicating copy to clipboard operation
oneDAL copied to clipboard

FIX: Check each error code instead of just last

Open david-cortes-intel opened this issue 6 months ago • 4 comments

Description

This PR modifies the logic for summary statistics to make a check after each call to MKL to verify that no error occurred, instead of checking only the last one. Theoretically it shouldn't matter as only the 'compute' step is somewhat expected to fail when the rest of the procedure is correct, but internal errors in logic can still happen.


PR should start as a draft, then move to ready for review state after CI is passed and all applicable checkboxes are closed. This approach ensures that reviewers don't spend extra time asking for regular requirements.

You can remove a checkbox as not applicable only if it doesn't relate to this PR in any way. For example, PR with docs update doesn't require checkboxes for performance while PR with any change in actual code should have checkboxes and justify how this code change is expected to affect performance (or justification should be self-evident).

Checklist to comply with before moving PR from draft:

PR completeness and readability

  • [x] I have reviewed my changes thoroughly before submitting this pull request.
  • [x] Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • [x] I have added a respective label(s) to PR if I have a permission for that.
  • [x] I have resolved any merge conflicts that might occur with the base branch.

Testing

  • [x] I have run it locally and tested the changes extensively.
  • [x] All CI jobs are green or I have provided justification why they aren't.

david-cortes-intel avatar May 26 '25 10:05 david-cortes-intel

/intelci: run

david-cortes-intel avatar May 26 '25 11:05 david-cortes-intel

/intelci: run

david-cortes-intel avatar Jun 16 '25 14:06 david-cortes-intel

/intelci: run

david-cortes-intel avatar Jun 23 '25 07:06 david-cortes-intel

CI failures are either timeouts, or not related to the changes here.

david-cortes-intel avatar Jun 23 '25 13:06 david-cortes-intel

@Vika-F In the current code and in the modified one that you posted, if passing method == __DAAL_VSL_SS_METHOD_FAST_USER_MEAN, wouldn't the means that it calculates either way get overridden by adding __DAAL_VSL_SS_ED_MEAN?

david-cortes-intel avatar Jun 30 '25 14:06 david-cortes-intel

@Vika-F I've rewritten these files using objects with destructors now. Let me know if this is what you had in mind in your comment.

david-cortes-intel avatar Jul 22 '25 06:07 david-cortes-intel

/intelci: run

david-cortes-intel avatar Jul 22 '25 06:07 david-cortes-intel

@david-cortes-intel Sorry, I've lost this one =
Yes, this is better than gotos in my opinion.

The only thing which bothers now is return 1 for memory allocation errors. Is it possible to use a better constant?

Vika-F avatar Aug 01 '25 14:08 Vika-F

@david-cortes-intel Sorry, I've lost this one = Yes, this is better than gotos in my opinion.

The only thing which bothers now is return 1 for memory allocation errors. Is it possible to use a better constant?

Yes. But what should that constant be? Is there some table describing what codes should be used for which error types?

david-cortes-intel avatar Aug 01 '25 15:08 david-cortes-intel

Yes. But what should that constant be? Is there some table describing what codes should be used for which error types?

Is it possible to use this one, casted to int: https://github.com/uxlfoundation/oneDAL/blob/main/cpp/daal/include/services/error_indexes.h#L150 ?

Vika-F avatar Aug 01 '25 16:08 Vika-F

Yes. But what should that constant be? Is there some table describing what codes should be used for which error types?

Is it possible to use this one, casted to int: https://github.com/uxlfoundation/oneDAL/blob/main/cpp/daal/include/services/error_indexes.h#L150 ?

Modified to use that error code instead.

david-cortes-intel avatar Aug 04 '25 08:08 david-cortes-intel

/intelci: run

Vika-F avatar Sep 08 '25 10:09 Vika-F

CI issues are not related to the changes here.

david-cortes-intel avatar Sep 08 '25 15:09 david-cortes-intel

Lets rebase and rerun CI to double check

ethanglaser avatar Oct 01 '25 21:10 ethanglaser

/intelci: run

david-cortes-intel avatar Oct 02 '25 06:10 david-cortes-intel