Skip to content

Commit 2493368

Browse files
author
Kaiyu Yang
committed
minor update
1 parent 454161d commit 2493368

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lake-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[{"git":
55
{"url": "https://github.com/leanprover/std4",
66
"subDir?": null,
7-
"rev": "ba5e5e3af519b4fc5221ad0fa4b2c87276f1d323",
7+
"rev": "efcb1a6fe69b57b16d370ffe36551c3d21b5a53e",
88
"opts": {},
99
"name": "std",
1010
"inputRev?": "main",

lakefile.lean

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def onnxPlatform := if System.Platform.isOSX then "osx-universal2" else "linux-x
2525
def onnxFileStem := s!"onnxruntime-{onnxPlatform}-{onnxVersion}"
2626
def onnxFilename := onnxFileStem ++ ".tgz"
2727
def onnxURL := "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/" ++ onnxFilename
28-
-- TODO: Support more versions of ONNX Runtime
2928

3029

3130
/- Only support 64-bit Linux or macOS -/
@@ -61,18 +60,21 @@ def getLibPath (name : String) : IO (Option FilePath) := do
6160
return libPath
6261
return none
6362

63+
6464
def afterReleaseAsync (pkg : Package) (build : SchedulerM (Job α)) : IndexBuildM (Job α) := do
6565
if pkg.preferReleaseBuild ∧ pkg.name ≠ (← getRootPackage).name then
6666
(← pkg.release.fetch).bindAsync fun _ _ => build
6767
else
6868
build
6969

70+
7071
def afterReleaseSync (pkg : Package) (build : BuildM α) : IndexBuildM (Job α) := do
7172
if pkg.preferReleaseBuild ∧ pkg.name ≠ (← getRootPackage).name then
7273
(← pkg.release.fetch).bindSync fun _ _ => build
7374
else
7475
Job.async build
7576

77+
7678
def copyLibJob (pkg : Package) (libName : String) : IndexBuildM (BuildJob FilePath) :=
7779
afterReleaseSync pkg do
7880
if !Platform.isOSX then -- Only required for Linux
@@ -158,6 +160,7 @@ target libonnxruntime pkg : FilePath := do
158160
else
159161
return (dst, ← computeTrace dst)
160162

163+
161164
def buildCpp (pkg : Package) (path : FilePath) (deps : List (BuildJob FilePath)) : SchedulerM (BuildJob FilePath) := do
162165
let optLevel := if pkg.buildType == .release then "-O3" else "-O0"
163166
let mut flags := #["-fPIC", "-std=c++11", "-stdlib=libc++", optLevel]

0 commit comments

Comments
 (0)