Skip to content

Commit 85730af

Browse files
committed
Tidying up
1 parent 9602a6a commit 85730af

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

tasks/env.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,4 @@
66
THIRD_PARTY_DIR = join(PROJ_ROOT, "third-party")
77
CROSSENV_DIR = join(PROJ_ROOT, "cross_venv", "cross")
88

9-
FAASM_SYSROOT = "/usr/local/faasm/llvm-sysroot"
10-
FAASM_TOOLCHAIN_FILE = (
11-
"/usr/local/code/faasm/third-party/faasm-toolchain/WasiToolchain.cmake"
12-
)
13-
149
USABLE_CPUS = str(int(cpu_count()) - 1)

tasks/libs.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import os
22

33
from copy import copy
4-
from faasmcli.util.toolchain import (
5-
CMAKE_TOOLCHAIN_FILE,
6-
WASM_LIB_INSTALL,
7-
)
4+
from faasmcli.util.toolchain import WASM_LIB_INSTALL
5+
from faasmcli.util.env import FAASM_TOOLCHAIN_FILE
86
from os.path import join
97
from subprocess import run
108
from tasks.env import USABLE_CPUS, THIRD_PARTY_DIR, CROSSENV_DIR
@@ -23,7 +21,7 @@
2321
"horovod": {
2422
"env": {
2523
"MAKEFLAGS": "-j{}".format(USABLE_CPUS),
26-
"HOROVOD_TOOLCHAIN_FILE": CMAKE_TOOLCHAIN_FILE,
24+
"HOROVOD_TOOLCHAIN_FILE": FAASM_TOOLCHAIN_FILE,
2725
"HOROVOD_WITH_MXNET": "1",
2826
"HOROVOD_WITH_MPI": "1",
2927
"HOROVOD_WITH_TENSORFLOW": "0",

tasks/mxnet.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
import os
88

99
from invoke import task
10-
from tasks.env import THIRD_PARTY_DIR, FAASM_SYSROOT, FAASM_TOOLCHAIN_FILE
10+
from faasmcli.util.env import FAASM_TOOLCHAIN_FILE
11+
from faasmcli.util.toolchain import WASM_SYSROOT
12+
from tasks.env import THIRD_PARTY_DIR
1113

1214
MXNET_DIR = join(THIRD_PARTY_DIR, "mxnet")
1315

@@ -20,11 +22,11 @@
2022
]
2123

2224
INSTALLED_HEADER_DIRS = [
23-
join(FAASM_SYSROOT, "include", "mxnet"),
24-
join(FAASM_SYSROOT, "include", "dmlc"),
25+
join(WASM_SYSROOT, "include", "mxnet"),
26+
join(WASM_SYSROOT, "include", "dmlc"),
2527
]
2628

27-
INSTALLED_LIBS_DIR = join(FAASM_SYSROOT, "lib", "wasm32-wasi")
29+
INSTALLED_LIBS_DIR = join(WASM_SYSROOT, "lib", "wasm32-wasi")
2830

2931

3032
@task
@@ -74,7 +76,7 @@ def install(ctx, clean=False, shared=True):
7476
"-DFAASM_BUILD_SHARED={}".format(shared_flag),
7577
"-DCMAKE_TOOLCHAIN_FILE={}".format(FAASM_TOOLCHAIN_FILE),
7678
"-DCMAKE_BUILD_TYPE=Release",
77-
"-DCMAKE_INSTALL_PREFIX={}".format(FAASM_SYSROOT),
79+
"-DCMAKE_INSTALL_PREFIX={}".format(WASM_SYSROOT),
7880
"-DCMAKE_INSTALL_LIBDIR=lib/wasm32-wasi",
7981
"-DCMAKE_DL_LIBS=",
8082
"-DUSE_CUDA=OFF",

0 commit comments

Comments
 (0)