Repository navigation
Add GPU KNN to Generate Truth - #336
Merged
Merged
Conversation
Fix KNN build
Only included need files in Kernel.cu
…h shared and local DistPair
query_KNN has transpose and all shared memory. query_KNN has transpose and heamMem in local.
2. Tested batch splitting on 35M 3. Moved the malloc before launching to avoid waste of memry
Remove debug command, build GPU SSDServing to exe in Debug
MaggieQi
reviewed
Oct 8, 2022
| /packages | ||
| /out/build/x64-Debug | ||
| /sgKey.snk | ||
| /out/build/x64-Debug |
Member
There was a problem hiding this comment.
already add x64-Debug, you do not need to add the files in that folder, all files in that folder will be ignored.
| </ItemGroup> | ||
| <ItemGroup> | ||
| <ClCompile Include="src\SSDServing\main.cpp" /> | ||
| <!--<ClCompile Include="src\SSDServing\main.cpp" />--> |
Contributor
Author
There was a problem hiding this comment.
Oh, I actually should put it back, since we have already fixed the Build issue by having TruthSet.cpp separately.
| } | ||
| } | ||
|
|
||
| //#define DefineVectorValueType(Name, Type) template static void GenerateTruth<Type>(std::shared_ptr<SPTAG::VectorSet> querySet, std::shared_ptr<SPTAG::VectorSet> vectorSet, const std::string truthFile, const SPTAG::DistCalcMethod distMethod, const int K, const SPTAG::TruthFileType p_truthFileType, const std::shared_ptr<SPTAG::COMMON::IQuantizer> & quantizer); |
MaggieQi
approved these changes
Oct 8, 2022
L1ray (L1-ray)
pushed a commit
to L1-ray/SPTAG
that referenced
this pull request
May 9, 2026
* GPU KNN Intergrate * Merged cuda hxx files * Remove extra files, fix CoreLibrary build * GPU code needs to be in cu file * break circular including * Rearranged the method * Included the files like Neighborhood Graph. h did. Only included need files in Kernel.cu * Relocate the Quey_KNN to KNN.hxx (templates cannot be in kernel.cu * Try to Instantizate before compile * Fixed compile error. Need GPU to test rest * Set Mem Failure * Adjusted the max dimension for vectors up ot 184 * Change DistCalMethod * Print Thread Start/End * Shared memory * Cannot launch Kernelr with 60% MaxSharedMemory * Root Cause: Transpose_Mem * L2 480s, Cosine 703s after Transpose * Two functions for Shared and local ThreadHeap, two launch setting with shared and local DistPair * Test version for Ben. 32 Threads defined in params.h query_KNN has transpose and all shared memory. query_KNN has transpose and heamMem in local. * Found the debugger issue, next step: fix dist calc * 1. Fixed int8 dist calc 2. Tested batch splitting on 35M 3. Moved the malloc before launching to avoid waste of memry * 45cap, monitor mem usage, track where Convert failed * Succeed on 400M 100D, Fixed int overflow, major change: int to size_t * Multi-GPU detection * Fixed the CPU mem over-usage, located the bug in updating results * Fixed multi free results * Fixed hard coded Cosine DistCalcMethod * Relocate the Point & Transposed Point to GPUKNNDistance.hxx * Merge SPTAG current changes, complaining about cuh cuda lib * Move Generate Truth to TruthSet.cpp * Fix optimization issue, add GPUCoreLibrary/GPUSSDServing to default build * Fix Error for Linux cmake. * Remove Unnecessary Changes. * restore datasets * missing s in folder name * Restore build config to Lib, restore sln Config * update tlog for lib config * Remove Wrappers * Removed not ignored log info * Remove Static in TruthSet.cpp Remove debug command, build GPU SSDServing to exe in Debug * Recover CL compile for GPU SSDServing/main.cpp Co-authored-by: diegocai <diegocai@microsoft.com> Co-authored-by: Philip Adams <philipadams@microsoft.com> Co-authored-by: Diego-Cai <103398280+Diego-Cai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add GPU KNN branch to Generate Truth
Code changes including:
To save implementation of Generate Truth to avoid compiling issue.
In order to detach GPU KNN generation from GPU Index build
Cmake Build Change: