diff options
| author | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-04-17 14:51:26 +0200 |
|---|---|---|
| committer | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-04-17 14:51:26 +0200 |
| commit | 7961b3eca428bf895b158152e596e0d220f6019a (patch) | |
| tree | 7149d0933bb77b7e9be91617d0193daeecd168fa /onnx/scripts/gen.sh | |
| parent | b591ef87dd44a4b4b45ca66f6da8e4c645ec7c0f (diff) | |
Add onnx module
Diffstat (limited to 'onnx/scripts/gen.sh')
| -rw-r--r-- | onnx/scripts/gen.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/onnx/scripts/gen.sh b/onnx/scripts/gen.sh new file mode 100644 index 0000000..683e51b --- /dev/null +++ b/onnx/scripts/gen.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +set -euo pipefail + +cd "$(dirname "$0")" + +PROTO_URL="https://raw.githubusercontent.com/onnx/onnx/v1.21.0/onnx/onnx.proto" +PROTO_SHA256="a05cfbcd1370608b809c5b84c44e3198d3369036458e0b5f297e76ceaf9c4e1b" + +if [ ! -f onnx.proto ]; then + curl -fsSL "$PROTO_URL" -o onnx.proto +fi + +echo "$PROTO_SHA256 onnx.proto" | shasum -a 256 -c + +protoc \ + --go_out=../internal/pb \ + --go_opt=paths=source_relative \ + --go_opt=Monnx.proto=go.jknobloc.com/x/onnx/internal/pb \ + onnx.proto |
