diff --git a/cpp/src/neighbors/ivf_flat_c.cpp b/cpp/src/neighbors/ivf_flat_c.cpp old mode 100644 new mode 100755 index decc88ab3..c14c1edc0 --- a/cpp/src/neighbors/ivf_flat_c.cpp +++ b/cpp/src/neighbors/ivf_flat_c.cpp @@ -47,7 +47,7 @@ void* _build(cuvsResources_t res, cuvsIvfFlatIndexParams params, DLManagedTensor build_params.conservative_memory_allocation = params.conservative_memory_allocation; auto dataset = dataset_tensor->dl_tensor; - auto dim = dataset.shape[0]; + auto dim = dataset.shape[1]; auto index = new cuvs::neighbors::ivf_flat::index(*res_ptr, build_params, dim); diff --git a/cpp/src/neighbors/ivf_pq_c.cpp b/cpp/src/neighbors/ivf_pq_c.cpp old mode 100644 new mode 100755 index 0afe9356d..2ecad6ada --- a/cpp/src/neighbors/ivf_pq_c.cpp +++ b/cpp/src/neighbors/ivf_pq_c.cpp @@ -51,7 +51,7 @@ void* _build(cuvsResources_t res, cuvsIvfPqIndexParams params, DLManagedTensor* build_params.max_train_points_per_pq_code = params.max_train_points_per_pq_code; auto dataset = dataset_tensor->dl_tensor; - auto dim = dataset.shape[0]; + auto dim = dataset.shape[1]; auto index = new cuvs::neighbors::ivf_pq::index(*res_ptr, build_params, dim);