Skip to content

Commit

Permalink
Merge branch 'dotnet:main' into patch6
Browse files Browse the repository at this point in the history
  • Loading branch information
feiyun0112 committed May 28, 2021
2 parents 300b3a7 + 7c34ab9 commit c79ea25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/building/unix-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Cross compilation is only supported on an Ubuntu host, 18.x and newer, and only
```sh
sudo apt-get update
sudo apt-get install debootstrap qemu-user-static
sudo apt-get install binutils-aarch64-linux-gnu
sudo ./eng/common/cross/build-rootfs.sh <target architecture> <ubuntu distro name> --rootfsdir <new rootfs location>
export ROOTFS_DIR=<new rootfs location>

Expand All @@ -55,6 +56,8 @@ export ROOTFS_DIR=<new rootfs location>

Note that the `<target architecture>` will usually be arm or arm64 and the `<ubuntu distro name>` is bionic for 18.04.

Alternatively, use the following Docker image which contains all the software packages and configurations required to cross-compile for ARM `mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-mlnet-cross-arm64-20210519131124-2e59a5f`.

### macOS

macOS 10.13 (High Sierra) or higher is needed to build dotnet/machinelearning. We are using a .NET Core 3.1 SDK to build, which supports 10.13 or higher.
Expand All @@ -73,4 +76,4 @@ $ brew update && brew install cmake https://raw.githubusercontent.com/dotnet/mac

Please note that newer versions of Homebrew [don't allow installing directly from a URL](https://github.com/Homebrew/brew/issues/8791). If you run into this issue, you may need to download libomp.rb first and install it with the local file instead.

Also, libomp version 7.0.0 doesn't have a cask for Big Sur. You can work around this by downloading the libomp.rb file and then calling `brew install libomp.rb --build-from-source --formula`.
Also, libomp version 7.0.0 doesn't have a cask for Big Sur. You can work around this by downloading the libomp.rb file and then calling `brew install libomp.rb --build-from-source --formula`.
2 changes: 1 addition & 1 deletion src/Microsoft.ML.OnnxTransformer/OnnxUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public OnnxModel(string modelFile, int? gpuDeviceId = null, bool fallbackToCpu =

// The CodedInputStream auto closes the stream, and we need to make sure that our main stream stays open, so creating a new one here.
using (var modelStream = new FileStream(modelFile, FileMode.Open, FileAccess.Read, FileShare.Delete | FileShare.Read))
using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, 10))
using (var codedStream = Google.Protobuf.CodedInputStream.CreateWithLimits(modelStream, Int32.MaxValue, 100))
model = OnnxCSharpToProtoWrapper.ModelProto.Parser.ParseFrom(codedStream);

// Parse actual input and output types stored in the loaded ONNX model to get their DataViewType's.
Expand Down

0 comments on commit c79ea25

Please sign in to comment.