Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions fern/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,22 @@ require_node_22() {

require_node_22

fern_config_version() {
python3 - "${SCRIPT_DIR}/fern.config.json" <<'PY'
import json
import sys

with open(sys.argv[1], encoding="utf-8") as f:
print(json.load(f).get("version", "*"))
PY
}

FERN_VERSION="$(fern_config_version)"

if [[ -n "${FERN_CLI:-}" ]]; then
FERN_CMD=("${FERN_CLI}")
elif [[ "${FERN_VERSION}" != "*" ]]; then
FERN_CMD=("npx" "--yes" "fern-api@${FERN_VERSION}")
elif command -v fern >/dev/null 2>&1; then
FERN_CMD=("fern")
else
Expand Down
38 changes: 28 additions & 10 deletions fern/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,22 @@ redirects:
destination: "/cuvs/developer-guide/coding-guidelines/cpp-guidelines"
- source: "/cuvs/developer-guide/guidelines/python-guidelines"
destination: "/cuvs/developer-guide/coding-guidelines/python-guidelines"
- source: "/cuvs/user-guide/compatibility"
destination: "/cuvs/user-guide/field-guide/compatibility"
- source: "/cuvs/user-guide/integration-patterns"
destination: "/cuvs/user-guide/field-guide/integration-patterns"
- source: "/cuvs/user-guide/advanced-topics"
destination: "/cuvs/user-guide/field-guide"
- source: "/cuvs/user-guide/advanced-topics/jit-compilation"
destination: "/cuvs/user-guide/field-guide/jit-compilation"
- source: "/cuvs/user-guide/advanced-topics/udf-usage"
destination: "/cuvs/user-guide/field-guide/udf-usage"
- source: "/cuvs/developer-guide/advanced-topics/jit-compilation"
destination: "/cuvs/user-guide/field-guide/jit-compilation"
- source: "/cuvs/developer-guide/abi-stability"
destination: "/cuvs/developer-guide/advanced-topics/abi-stability"
- source: "/cuvs/developer-guide/link-time-optimization"
destination: "/cuvs/developer-guide/advanced-topics/link-time-optimization"
layout:
searchbar-placement: "header"
page-width: "1376px"
Expand Down Expand Up @@ -206,13 +222,13 @@ navigation:
- page: "Wiki-all Dataset"
hidden: true
path: "./pages/cuvs_bench/wiki_all_dataset.md"
- page: "Compatibility"
path: "./pages/user_guide/abi_stability.md"
- page: "Integration Patterns"
path: "./pages/user_guide/integration_patterns.md"
- section: "Advanced Topics"
path: "./pages/advanced_topics.md"
- section: "Field Guide"
path: "./pages/field_guide.md"
contents:
- page: "Compatibility"
path: "./pages/user_guide/abi_stability.md"
- page: "Integration Patterns"
path: "./pages/user_guide/integration_patterns.md"
- page: "JIT Compilation"
path: "./pages/jit_compilation.md"
- page: "UDF Usage"
Expand All @@ -233,10 +249,12 @@ navigation:
path: "./pages/java_guidelines.md"
- page: "Python Guidelines"
path: "./pages/python_guidelines.md"
- page: "ABI Stability"
path: "./developer_guide/abi_stability.md"
- page: "Link-time Optimization"
path: "./pages/jit_lto_guide.md"
- section: "Advanced Topics"
contents:
- page: "ABI Stability"
path: "./developer_guide/abi_stability.md"
- page: "Link-time Optimization"
Comment on lines +254 to +256

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix broken navigation path for ABI Stability.

Line 253 uses ./developer_guide/abi_stability.md, but navigation paths in this file consistently resolve from ./pages/.... This likely breaks the Developer Guide sidebar entry and link checks.

Suggested fix
       - section: "Advanced Topics"
         contents:
           - page: "ABI Stability"
-            path: "./developer_guide/abi_stability.md"
+            path: "./pages/developer_guide/abi_stability.md"
           - page: "Link-time Optimization"
             path: "./pages/jit_lto_guide.md"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- page: "ABI Stability"
path: "./developer_guide/abi_stability.md"
- page: "Link-time Optimization"
- page: "ABI Stability"
path: "./pages/developer_guide/abi_stability.md"
- page: "Link-time Optimization"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@fern/docs.yml` around lines 252 - 254, The "ABI Stability" navigation entry
uses a relative path "./developer_guide/abi_stability.md" that is inconsistent
with other entries; update the path for the page "ABI Stability" (the YAML
mapping with key page: "ABI Stability") to match the repository's nav convention
(e.g. "./pages/developer_guide/abi_stability.md") so sidebar resolution and link
checks succeed.

path: "./pages/jit_lto_guide.md"
- page: "Contributing"
path: "./pages/contributing.md"
- section: "API Reference"
Expand Down
2 changes: 1 addition & 1 deletion fern/fern.config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"organization": "nvidia",
"version": "*"
"version": "5.44.3"
}
13 changes: 0 additions & 13 deletions fern/pages/advanced_topics.md

This file was deleted.

2 changes: 1 addition & 1 deletion fern/pages/api_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ slug: user-guide/api-guides

Use these pages to find task-focused NVIDIA cuVS API examples for clustering, vector indexing, preprocessing, and supporting routines.

NVIDIA cuVS is written in C++ at its core and wrapped by a stable C API layer. The Python, Java, Rust, and Go bindings use that C layer so they can share the same ABI boundary; see [Compatibility](/user-guide/compatibility) for why that matters. These API guides are intended for general use and include examples for supported programming languages where possible, but some guides document C++ concepts explicitly because all NVIDIA cuVS algorithm implementations are C++ at the core.
NVIDIA cuVS is written in C++ at its core and wrapped by a stable C API layer. The Python, Java, Rust, and Go bindings use that C layer so they can share the same ABI boundary; see [Compatibility](/user-guide/field-guide/compatibility) for why that matters. These API guides are intended for general use and include examples for supported programming languages where possible, but some guides document C++ concepts explicitly because all NVIDIA cuVS algorithm implementations are C++ at the core.

## Common Types

Expand Down
40 changes: 20 additions & 20 deletions fern/pages/c_api/c-api-cluster-kmeans.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ struct cuvsKMeansParams {
| `tol` | `double` | Relative tolerance with regards to inertia to declare convergence. |
| `n_init` | `int` | Number of instance k-means algorithm will be run with different seeds. |
| `oversampling_factor` | `double` | Oversampling factor for use in the k-means\|\| algorithm |
| `batch_samples` | `int` | batch_samples and batch_centroids are used to tile 1NN computation which is useful to optimize/control the memory footprint Default tile is [batch_samples x n_clusters] i.e. when batch_centroids is 0 then don't tile the centroids |
| `batch_samples` | `int` | batch_samples and batch_centroids are used to tile 1NN computation which is useful to optimize/control the memory footprint<br />Default tile is [batch_samples x n_clusters] i.e. when batch_centroids is 0 then don't tile the centroids |
| `batch_centroids` | `int` | if 0 then batch_centroids = n_clusters |
| `inertia_check` | `bool` | Deprecated, ignored. Kept for ABI compatibility. |
| `hierarchical` | `bool` | Whether to use hierarchical (balanced) kmeans or not |
Expand Down Expand Up @@ -105,7 +105,7 @@ struct cuvsKMeansParams_v2 {
| `tol` | `double` | Relative tolerance with regards to inertia to declare convergence. |
| `n_init` | `int` | Number of instance k-means algorithm will be run with different seeds. |
| `oversampling_factor` | `double` | Oversampling factor for use in the k-means\|\| algorithm |
| `batch_samples` | `int` | batch_samples and batch_centroids are used to tile 1NN computation which is useful to optimize/control the memory footprint Default tile is [batch_samples x n_clusters] i.e. when batch_centroids is 0 then don't tile the centroids |
| `batch_samples` | `int` | batch_samples and batch_centroids are used to tile 1NN computation which is useful to optimize/control the memory footprint<br />Default tile is [batch_samples x n_clusters] i.e. when batch_centroids is 0 then don't tile the centroids |
| `batch_centroids` | `int` | if 0 then batch_centroids = n_clusters |
| `hierarchical` | `bool` | Whether to use hierarchical (balanced) kmeans or not |
| `hierarchical_n_iters` | `int` | For hierarchical k-means , defines the number of training iterations |
Expand All @@ -119,7 +119,7 @@ struct cuvsKMeansParams_v2 {
Allocate KMeans params, and populate with default values

```c
CUVS_EXPORT cuvsError_t cuvsKMeansParamsCreate(cuvsKMeansParams_t* params);
cuvsError_t cuvsKMeansParamsCreate(cuvsKMeansParams_t* params);
```

**Note:** In cuVS 26.08 (next ABI major version) this signature will be<br />replaced by cuvsKMeansParamsCreate_v2.
Expand All @@ -132,15 +132,15 @@ CUVS_EXPORT cuvsError_t cuvsKMeansParamsCreate(cuvsKMeansParams_t* params);

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeansparamsdestroy"></a>
### cuvsKMeansParamsDestroy

De-allocate KMeans params

```c
CUVS_EXPORT cuvsError_t cuvsKMeansParamsDestroy(cuvsKMeansParams_t params);
cuvsError_t cuvsKMeansParamsDestroy(cuvsKMeansParams_t params);
```

**Note:** In cuVS 26.08 (next ABI major version) this signature will be<br />replaced by cuvsKMeansParamsDestroy_v2.
Expand All @@ -153,15 +153,15 @@ CUVS_EXPORT cuvsError_t cuvsKMeansParamsDestroy(cuvsKMeansParams_t params);

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeansparamscreate-v2"></a>
### cuvsKMeansParamsCreate_v2

Allocate KMeans params

```c
CUVS_EXPORT cuvsError_t cuvsKMeansParamsCreate_v2(cuvsKMeansParams_v2_t* params);
cuvsError_t cuvsKMeansParamsCreate_v2(cuvsKMeansParams_v2_t* params);
```

Mirrors cuvsKMeansParamsCreate but operates on cuvsKMeansParams_v2. Will become the unsuffixed cuvsKMeansParamsCreate in cuVS 26.08.
Expand All @@ -174,15 +174,15 @@ Mirrors cuvsKMeansParamsCreate but operates on cuvsKMeansParams_v2. Will become

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeansparamsdestroy-v2"></a>
### cuvsKMeansParamsDestroy_v2

De-allocate KMeans params allocated by cuvsKMeansParamsCreate_v2.

```c
CUVS_EXPORT cuvsError_t cuvsKMeansParamsDestroy_v2(cuvsKMeansParams_v2_t params);
cuvsError_t cuvsKMeansParamsDestroy_v2(cuvsKMeansParams_v2_t params);
```

**Parameters**
Expand All @@ -193,7 +193,7 @@ CUVS_EXPORT cuvsError_t cuvsKMeansParamsDestroy_v2(cuvsKMeansParams_v2_t params)

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeanstype"></a>
### cuvsKMeansType
Expand Down Expand Up @@ -222,7 +222,7 @@ typedef enum {
Find clusters with k-means algorithm.

```c
CUVS_EXPORT cuvsError_t cuvsKMeansFit(cuvsResources_t res,
cuvsError_t cuvsKMeansFit(cuvsResources_t res,
cuvsKMeansParams_t params,
DLManagedTensor* X,
DLManagedTensor* sample_weight,
Expand Down Expand Up @@ -251,15 +251,15 @@ X may reside on either host (CPU) or device (GPU) memory. When X is on the host

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeansfit-v2"></a>
### cuvsKMeansFit_v2

Find clusters with k-means algorithm (v2 params layout).

```c
CUVS_EXPORT cuvsError_t cuvsKMeansFit_v2(cuvsResources_t res,
cuvsError_t cuvsKMeansFit_v2(cuvsResources_t res,
cuvsKMeansParams_v2_t params,
DLManagedTensor* X,
DLManagedTensor* sample_weight,
Expand All @@ -284,15 +284,15 @@ Mirrors cuvsKMeansFit but takes cuvsKMeansParams_v2_t. Will become the unsuffixe

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeanspredict"></a>
### cuvsKMeansPredict

Predict the closest cluster each sample in X belongs to.

```c
CUVS_EXPORT cuvsError_t cuvsKMeansPredict(cuvsResources_t res,
cuvsError_t cuvsKMeansPredict(cuvsResources_t res,
cuvsKMeansParams_t params,
DLManagedTensor* X,
DLManagedTensor* sample_weight,
Expand All @@ -319,15 +319,15 @@ double* inertia);

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeanspredict-v2"></a>
### cuvsKMeansPredict_v2

Predict the closest cluster each sample in X belongs to (v2 params layout).

```c
CUVS_EXPORT cuvsError_t cuvsKMeansPredict_v2(cuvsResources_t res,
cuvsError_t cuvsKMeansPredict_v2(cuvsResources_t res,
cuvsKMeansParams_v2_t params,
DLManagedTensor* X,
DLManagedTensor* sample_weight,
Expand All @@ -354,15 +354,15 @@ Mirrors cuvsKMeansPredict but takes cuvsKMeansParams_v2_t. Will become the unsuf

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)

<a id="cuvskmeansclustercost"></a>
### cuvsKMeansClusterCost

Compute cluster cost

```c
CUVS_EXPORT cuvsError_t cuvsKMeansClusterCost(cuvsResources_t res,
cuvsError_t cuvsKMeansClusterCost(cuvsResources_t res,
DLManagedTensor* X,
DLManagedTensor* centroids,
double* cost);
Expand All @@ -379,4 +379,4 @@ double* cost);

**Returns**

[`CUVS_EXPORT cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
[`cuvsError_t`](/api-reference/c-api-core-c-api#cuvserror-t)
Loading
Loading