Skip to content

Conversation

@AyodeAwe
Copy link
Contributor

@AyodeAwe AyodeAwe commented Mar 28, 2025

This PR adds automation for publishing the cuvs and cuvs-sys rust crates.

I updated the rust usage README to include simple steps to import the cuvs module in any consuming rust project. I've added conda environment files that would facilitate the installation steps described in the README.


Testing the changes in this PR included the following steps:

  • I first replicated local builds of the cuvs rust module.
  • Then I attempted a build of the rust example in the examples directory which imports the current cuvs library as is, and successfully ran the rust example project.
  • I updated the rust bindings to use different package names and published both as:
  • I published by running the publish-rust.yaml workflow. First run can be found here, and a second run here.
  • After publishing, I locally compiled the example rust module by importing the published modules (jawe-cuvs-iii & jawe-cuvs-sys-iii) and was able to successfully run the example rust project
  • I also tested the build & imports on both ARM and AMD architectures.
Cargo run output
# cargo run
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.05s
     Running `target/debug/cuvs-rust-example`
using ivf_pq::index_params nrows 65536, dim 512, n_lists 256, pq_dim 128
[ 18669][17:16:49:911962][info  ] optimizing graph
[ 18669][17:16:50:057608][info  ] Graph optimized, creating index
Indexed 65536x512 datapoints into cagra index
Neighbors [[0, 6880, 12927, 59705, 45003, 33779, 39003, 56796, 6491, 34338],
 [1, 28206, 47512, 44788, 14031, 49376, 43330, 3429, 41428, 49044],
 [2, 45154, 4777, 62753, 45378, 13104, 4082, 46221, 65234, 45638],
 [3, 41243, 59296, 4950, 55157, 32839, 42927, 10811, 37504, 57827]], shape=[4, 10], strides=[10, 1], layout=Cc (0x5), const ndim=2
Distances [[0.0, 68.72183, 69.83197, 70.23868, 71.08637, 71.15034, 71.60148, 71.71672, 71.82242, 71.90005],
 [0.0, 68.85643, 69.43584, 69.72554, 69.883835, 70.03081, 70.05081, 70.1477, 70.169556, 70.26346],
 [0.0, 69.09878, 69.42933, 70.06172, 70.10106, 70.16475, 70.19414, 70.64023, 70.64905, 70.71358],
 [0.0, 64.99479, 65.39395, 66.827286, 66.99862, 67.110855, 67.57162, 67.779526, 67.964035, 68.002716]], shape=[4, 10], strides=[10, 1], layout=Cc (0x5), const ndim=2

@AyodeAwe AyodeAwe added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Mar 28, 2025
@AyodeAwe AyodeAwe requested review from a team as code owners March 28, 2025 14:19
@AyodeAwe AyodeAwe requested a review from jameslamb March 28, 2025 14:19
@AyodeAwe AyodeAwe requested a review from a team as a code owner March 28, 2025 15:17
@AyodeAwe AyodeAwe requested review from benfred and raydouglass April 1, 2025 16:01
Copy link
Member

@benfred benfred left a comment

Choose a reason for hiding this comment

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

This looks great! Thanks for taking this on @AyodeAwe !

I have one minor question:

@AyodeAwe AyodeAwe merged commit dfe612b into rapidsai:branch-25.04 Apr 3, 2025
67 of 68 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Development

Successfully merging this pull request may close these issues.

3 participants