From f4f750af3cb07c095869c36a9bc1994edf438aa1 Mon Sep 17 00:00:00 2001 From: Eric Hambro Date: Thu, 14 Apr 2022 03:41:11 -0700 Subject: [PATCH] Make converter statically linked, instead of dynamically. --- CMakeLists.txt | 2 +- nle/tests/test_converter.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 219afccae..463417141 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -151,7 +151,7 @@ add_dependencies(_pynethack util) # For pm.h. # ttyrec converter library add_library( - converter SHARED ${CMAKE_CURRENT_SOURCE_DIR}/third_party/converter/converter.c + converter STATIC ${CMAKE_CURRENT_SOURCE_DIR}/third_party/converter/converter.c ${CMAKE_CURRENT_SOURCE_DIR}/third_party/converter/stripgfx.c) target_include_directories( converter PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/third_party/libtmt diff --git a/nle/tests/test_converter.py b/nle/tests/test_converter.py index 75cad4595..587cd22be 100644 --- a/nle/tests/test_converter.py +++ b/nle/tests/test_converter.py @@ -72,7 +72,7 @@ def convert_n_times(n): memory_list = memory_usage((convert_n_times, (100,), {})) # After warmup the last few iterations should be constant memory - memory_array = np.array(memory_list[3:]) + memory_array = np.array(memory_list[5:]) memory_change = (memory_array / memory_array[0]) - 1 assert max(memory_change) < 0.001 # 0.1 per cent