Skip to content

Commit 535fbb4

Browse files
authored
Remove emulator usage (#16)
1 parent a96d206 commit 535fbb4

File tree

12 files changed

+8
-454
lines changed

12 files changed

+8
-454
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,8 @@ jobs:
2525
run: git checkout --force ci-branch
2626
- name: "Update cpp submodule"
2727
run: git submodule update third-party/cpp
28-
- name: "Install base requirements"
28+
- name: "Install requirements"
2929
run: pip3 install -r requirements.txt
30-
- name: "Install pyfaasm requirements"
31-
run: pip3 install -r pyfaasm/test_requirements.txt
3230
- name: "Python formatting check"
3331
run: ./bin/check_python.sh
3432
- name: "Check C/C++ formatting"
@@ -58,11 +56,9 @@ jobs:
5856
run: git fetch origin ${GITHUB_REF}:ci-branch
5957
- name: "Check out branch"
6058
run: git checkout --force ci-branch
61-
- name: "Install base requirements"
59+
- name: "Install requirements"
6260
run: pip3 install -r requirements.txt
63-
- name: "Install pyfaasm requirements"
64-
run: pip3 install -r pyfaasm/test_requirements.txt
65-
- name: "Install pyfaasm"
66-
run: inv pyfaasm.native
67-
- name: "Run pyfaasm tests"
68-
run: inv pyfaasm.test
61+
- name: "Build Python function"
62+
run: inv func
63+
- name: "Check copying Python functions locally"
64+
run: inv func.upload-all --local

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ RUN ./install_build_python.sh
1212

1313
# Hack to avoid reinstalling Python libs every time
1414
COPY requirements.txt .
15-
COPY pyfaasm/test_requirements.txt .
1615
RUN pip3 install -r requirements.txt
17-
RUN pip3 install -r test_requirements.txt
1816

1917
# Clone current tag
2018
WORKDIR /code

pyfaasm/pyfaasm/core.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,6 @@
77
# Faasm host interface:
88
# https://github.com/faasm/faasm/blob/master/include/faasm/host_interface.h
99

10-
NATIVE_SUPPORTING_LIBS = [
11-
"libpistache.so",
12-
"libfaabricmpi.so",
13-
]
14-
15-
NATIVE_INTERFACE_LIB = "libemulator.so"
16-
1710
env_cache = dict()
1811

1912
input_data = None
@@ -37,10 +30,6 @@ def set_env_bool(var_name, value):
3730
env_cache[var_name] = value
3831

3932

40-
def is_wasm():
41-
return get_env_bool("PYTHONWASM")
42-
43-
4433
def is_local_chaining():
4534
return get_env_bool("PYTHON_LOCAL_CHAINING")
4635

@@ -59,19 +48,7 @@ def set_local_input_output(value):
5948

6049
def _init_host_interface():
6150
global _host_interface
62-
63-
if _host_interface is None:
64-
# Wasm and native environments are different
65-
if is_wasm():
66-
# Wasm expects the main application to handle the relevant calls
67-
_host_interface = ctypes.CDLL(None)
68-
else:
69-
# Load all supporting libs as globally linkable
70-
for lib in NATIVE_SUPPORTING_LIBS:
71-
ctypes.CDLL(lib, mode=ctypes.RTLD_GLOBAL)
72-
73-
# Load main Faasm host interface lib
74-
_host_interface = ctypes.CDLL(NATIVE_INTERFACE_LIB)
51+
_host_interface = ctypes.CDLL(None)
7552

7653

7754
def get_input_len():

pyfaasm/test/__init__.py

Whitespace-only changes.

pyfaasm/test/test_emulator.py

Lines changed: 0 additions & 79 deletions
This file was deleted.

pyfaasm/test/test_inputs.py

Lines changed: 0 additions & 31 deletions
This file was deleted.

pyfaasm/test/test_matrices.py

Lines changed: 0 additions & 192 deletions
This file was deleted.

0 commit comments

Comments
 (0)