Skip to content
Open
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
5 changes: 3 additions & 2 deletions candle-onnx/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ candle = { path = "../candle-core", package = "candle-core", version = "0.9.1" }
candle-nn = { path = "../candle-nn", version = "0.9.1" }
prost = "0.12.1"

[build-dependencies]
prost-build = "0.12.1"
# [build-dependencies]
# prost-build = "0.12.1"
# protobuf-src = "2.1.1"

[dev-dependencies]
anyhow = { version = "1", features = ["backtrace"] }
Expand Down
18 changes: 0 additions & 18 deletions candle-onnx/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
# candle-onnx

This crate adds ONNX support to candle

## FAQ

#### Missing protoc installation when compiling candle-onnx

The candle-onnx dependency prost-build no longer comes bundled with prost
binaries. This could cause the following error when attempting to compile
candle-onnx:

```
error: failed to run custom build command for `candle-onnx`
Caused by: // (...)
Could not find `protoc` installation and this build crate cannot proceed without this knowledge.
```

To fix this issue install protoc on your system and make it available in your
system `PATH`. See the [protoc
documentation](https://grpc.io/docs/protoc-installation/) for more information.
1 change: 1 addition & 0 deletions candle-onnx/build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use std::io::Result;

fn main() -> Result<()> {
std::env::set_var("PROTOC", protobuf_src::protoc());
prost_build::compile_protos(&["src/onnx.proto3"], &["src/"])?;
Ok(())
}
1 change: 1 addition & 0 deletions candle-onnx/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use candle::Result;
pub use prost;
use prost::Message;

pub mod onnx {
Expand Down
Loading