Skip to content

Commit ea59391

Browse files
alexmalyshevmeta-codesync[bot]
authored andcommitted
Properly install Static Python loader in benchmarks
Summary: Turns out the error was PEBKAC. Static Python needs to be installed before the static modules are imported, otherwise they'll use the standard loader. Reviewed By: yoney Differential Revision: D93694162 fbshipit-source-id: 3cb4f59bab36a60078b5988c3dd1a4ca6cd416d8
1 parent 76ed00f commit ea59391

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

cinderx/benchmarks/richards_static.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Copyright (c) Meta Platforms, Inc. and affiliates.
22

3+
from cinderx.compiler.strict import loader as static_python_loader
4+
5+
static_python_loader.install()
6+
37
import sys
48

59
import cinderx.jit
6-
from cinderx.compiler.strict import loader as static_python_loader
710

811
from .richards_static_lib import Richards
912

1013

1114
if __name__ == "__main__":
12-
static_python_loader.install()
1315
cinderx.jit.auto()
1416

1517
num_iterations = 1

cinderx/benchmarks/richards_static_basic.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# Copyright (c) Meta Platforms, Inc. and affiliates.
22

3+
from cinderx.compiler.strict import loader as static_python_loader
4+
5+
static_python_loader.install()
6+
37
import sys
48

59
import cinderx.jit
6-
from cinderx.compiler.strict import loader as static_python_loader
710

811
from .richards_static_basic_lib import Richards
912

1013

1114
if __name__ == "__main__":
12-
static_python_loader.install()
1315
cinderx.jit.auto()
1416

1517
num_iterations = 1

0 commit comments

Comments
 (0)