Skip to content

[enhancement] adding csr online support to oneDAL basic_statistics - #3715

Draft
icfaust wants to merge 3 commits into
uxlfoundation:mainfrom
icfaust:dev/online_csr_lom
Draft

[enhancement] adding csr online support to oneDAL basic_statistics#3715
icfaust wants to merge 3 commits into
uxlfoundation:mainfrom
icfaust:dev/online_csr_lom

Conversation

@icfaust

@icfaust icfaust commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Description

Will need to iterate, developed with claude follow precedents set by basic_statstics and kmeans.


Checklist:

Completeness and readability

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes or created a separate PR with updates and provided its number in the description, if necessary.
  • Git commit message contains an appropriate signed-off-by string (see CONTRIBUTING.md for details).
  • I have resolved any merge conflicts that might occur with the base branch.

Testing

  • I have run it locally and tested the changes extensively.
  • All CI jobs are green or I have provided justification why they aren't.
  • I have extended testing suite if new functionality was introduced in this PR.

Performance

  • I have measured performance for affected algorithms using scikit-learn_bench and provided at least a summary table with measured data, if performance change is expected.
  • I have provided justification why performance and/or quality metrics have changed or why changes are not expected.
  • I have extended the benchmarking suite and provided a corresponding scikit-learn_bench PR if new measurable functionality was introduced in this PR.


template <typename Float, daal::internal::CpuType Cpu>
template <daal_lom::Method Value>
using daal_method_constant = std::integral_constant<daal_lom::Method, Value>;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This follows on precedent in kmeans.

Float,
oneapi::dal::backend::interop::to_daal_cpu_type<decltype(cpu)>::value,
Method>()
.finalizeCompute(daal_partial_obs.get(),

@icfaust icfaust Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

required due to limitations in call_daal_kernel_finalize_compute to the default method (I didn't understand this at first, but have verified).

return (data.row_count_ > 100 || data.column_count_ > 100) && policy.is_cpu();
}

std::vector<csr_table> split_csr_by_rows(const csr_table& table, std::int64_t split_count) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I need help here. I am not well versed in catch2 (only basic knowledge).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What kind of help?
This implementation looks reasonable from the first glance for CPU-only usage.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Would need to rename this file based on its use for csr support as well (following the precedent of basic_statistics for batch jobs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants