Skip to content

Commit

Permalink
mxnet 1.9.1 (new formula)
Browse files Browse the repository at this point in the history
Closes #111872.

Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
  • Loading branch information
ankane authored and BrewTestBot committed Oct 8, 2022
1 parent 099dccc commit 196e6a1
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions Formula/mxnet.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
class Mxnet < Formula
desc "Flexible and efficient library for deep learning"
homepage "https://mxnet.apache.org"
url "https://dlcdn.apache.org/incubator/mxnet/1.9.1/apache-mxnet-src-1.9.1-incubating.tar.gz"
sha256 "11ea61328174d8c29b96f341977e03deb0bf4b0c37ace658f93e38d9eb8c9322"
license "Apache-2.0"

depends_on "cmake" => :build
depends_on "python@3.10" => :build
depends_on "openblas"
depends_on "opencv"

def install
args = [
"-DBUILD_CPP_EXAMPLES=OFF",
"-DUSE_CCACHE=OFF",
"-DUSE_CPP_PACKAGE=ON",
"-DUSE_CUDA=OFF",
"-DUSE_MKLDNN=OFF",
"-DUSE_OPENMP=OFF",
]
args << "-DUSE_SSE=OFF" if Hardware::CPU.arm?
system "cmake", "-B", "build", *std_cmake_args, *args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
pkgshare.install "cpp-package/example"
end

test do
cp pkgshare/"example/test_kvstore.cpp", testpath
system ENV.cxx, "-std=c++11", "-o", "test", "test_kvstore.cpp",
"-I#{include}", "-L#{lib}", "-lmxnet"
system "./test"
end
end

0 comments on commit 196e6a1

Please sign in to comment.