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: Preamble for hardware intrinsics implementation #830

Open
20 tasks
briancylui opened this issue Sep 5, 2018 · 0 comments
Open
20 tasks
Labels
enhancement New feature or request 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

  • Do "preamble" for the implementation of SSE/AVX intrinsics in src\Microsoft.ML.CpuMath\SseIntrinsics.cs and src\Microsoft.ML.CpuMath\AvxIntrinsics.cs:

Preamble:

  1. while (!aligned) { do scalar operation; } // preamble
  2. Do vectorized operation using ReadAligned
  3. while (!end) { do scalar operation; }
    For large arrays, especially those that cross cache line or page boundaries, doing this should save some measurable amount of time.

Reference: https://github.com/dotnet/machinelearning/pull/562/files/f0f81a5019a3c8cbd795a970e40d633e9e1770c1#r204061074
#1143

Currently these functions are just using Unaligned Loads, we can make them after by aligning the data and doing aligned loads.

  • AddScalerU
  • ScaleSrcU
  • AddScaleU
  • ScaleAddU
  • AddU
  • AddScaleCopyU
  • AddSU
  • MulElementWiseU
  • SumU
  • SumSqU
  • SumSqDiffU
  • SumAbsU
  • SumAbsDiffU
  • MaxAbsU
  • MaxAbsDiffU
  • DotU
  • DotSU
  • Dist2
  • SdcaL1UpdateU
  • SdcaL1UpdateSU
@briancylui briancylui changed the title Preamble for hardware intrinsics implementation CpuMath Enhancement: Preamble for hardware intrinsics implementation Sep 6, 2018
@Anipik Anipik added the up-for-grabs A good issue to fix if you are trying to contribute to the project label Oct 18, 2018
@gvashishtha gvashishtha added P2 Priority of the issue for triage purpose: Needs to be fixed at some point. enhancement New feature or request labels Jan 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 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

3 participants