Skip to content

Commit ca0538d

Browse files
committed
chore(tfhe): make sure the GPU module is present during doc compilation
1 parent b4619bb commit ca0538d

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,7 @@ test_concrete_csprng:
631631
doc: install_rs_check_toolchain
632632
RUSTDOCFLAGS="--html-in-header katex-header.html" \
633633
cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" doc \
634-
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer,internal-keycache --no-deps -p $(TFHE_SPEC)
634+
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer,gpu,internal-keycache --no-deps -p $(TFHE_SPEC)
635635

636636
.PHONY: docs # Build rust doc alias for doc
637637
docs: doc
@@ -640,7 +640,7 @@ docs: doc
640640
lint_doc: install_rs_check_toolchain
641641
RUSTDOCFLAGS="--html-in-header katex-header.html -Dwarnings" \
642642
cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" doc \
643-
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer,internal-keycache -p $(TFHE_SPEC) --no-deps
643+
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer,gpu,internal-keycache -p $(TFHE_SPEC) --no-deps
644644

645645
.PHONY: lint_docs # Build rust doc with linting enabled alias for lint_doc
646646
lint_docs: lint_doc

backends/tfhe-cuda-backend/build.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ use std::env;
22
use std::process::Command;
33

44
fn main() {
5+
if env::var("RUSTDOC").is_ok() {
6+
return;
7+
}
8+
59
println!("Build tfhe-cuda-backend");
610
if env::consts::OS == "linux" {
711
let output = Command::new("./get_os_name.sh").output().unwrap();

tfhe/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ aarch64-unix = ["aarch64", "seeder_unix"]
144144

145145
[package.metadata.docs.rs]
146146
# TODO: manage builds for docs.rs based on their documentation https://docs.rs/about
147-
features = ["x86_64-unix", "boolean", "shortint", "integer"]
147+
features = ["x86_64-unix", "boolean", "shortint", "integer", "gpu"]
148148
rustdoc-args = ["--html-in-header", "katex-header.html"]
149149

150150
###########

0 commit comments

Comments
 (0)