-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes #111872. Signed-off-by: Rui Chen <rui@chenrui.dev> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
- Loading branch information
1 parent
099dccc
commit 196e6a1
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |