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

introduce hgraph #114

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

introduce hgraph #114

wants to merge 1 commit into from

Conversation

LHT129
Copy link
Collaborator

@LHT129 LHT129 commented Nov 4, 2024

  • add basic implement for hgraph(hnswsq version)
  • add one test for it

std::cerr << "Failed to build index: internalError" << std::endl;
exit(-1);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

add the search process and verify the result

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

delete example. I will add new example use new params

@@ -21,3 +21,6 @@ target_link_libraries(custom_logger vsag)

add_executable (vsag_ext_example vsag_ext_example.cpp)
target_link_libraries(vsag_ext_example vsag)

add_executable (example_hgraph example_hgraph.cpp)
target_link_libraries(example_hgraph vsag -fopenmp gomp)
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do you link the openmp here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ditto

#include <nlohmann/json.hpp>
#include <random>

#include "local_file_reader.h"
Copy link
Collaborator

Choose a reason for hiding this comment

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

why do you include the file here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ditto

} else if (name == INDEX_HGRAPH) {
auto json_param = nlohmann::json::parse(parameters);
IndexCommonParam param;
CHECK_ARGUMENT(json_param.contains(PARAMETER_METRIC_TYPE),
Copy link
Collaborator

Choose a reason for hiding this comment

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

use CHECK_ARGUMENT in parsing process rather than here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

if (allocator != nullptr) {
param.allocator_ = allocator;
} else {
param.allocator_ = new DefaultAllocator();
Copy link
Collaborator

Choose a reason for hiding this comment

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

replace it with DefaultAllocator::Instance();

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

}
if (!neighbors.empty()) {
flatten->Prefetch(neighbors[0]);
#ifdef USE_SSE
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the difference between the flatten->Prefetch and the following prefetch process.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this prefetch vec data, the following prefetch visit_list

@@ -58,6 +58,48 @@ main(int argc, char* argv[]) {
std::string build_parameters = argv[4];
std::string search_parameters = argv[5];

if (build_parameters == "hello hgraph") {
Copy link
Collaborator

Choose a reason for hiding this comment

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

what's the mean of hello hgraph

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

the origin param is too long,so I mark another name to do this, I will reset the changes in test_performance and examples

@LHT129 LHT129 force-pushed the hgraph branch 4 times, most recently from f8d74f7 to a3ba76f Compare November 5, 2024 03:46
- add basic implement for hgraph(hnswsq version)
- add one test for it

Signed-off-by: LHT129 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature or request size/XXL
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants