-
Notifications
You must be signed in to change notification settings - Fork 65
/
__init__.py
30 lines (18 loc) · 918 Bytes
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os
import sys
from .common.set_path import set_build_folder
__version__ = '1.1'
###########################################################
# Initialize some variables: the values may be redefined
gpu_available = False
torch_found = False
###########################################################
# Compilation options
script_folder = os.path.dirname(os.path.abspath(__file__))
bin_folder = set_build_folder()
# Set the verbosity option: display output of compilations. This is a boolean: False or True
verbose = bool(int(os.environ['PYKEOPS_VERBOSE'])) if 'PYKEOPS_VERBOSE' in os.environ else False
# Force compiled and set the cmake build type. This is a string with possible value "Release" or "Debug"
build_type = str(os.environ['PYKEOPS_BUILD_TYPE']) if ('PYKEOPS_BUILD_TYPE' in os.environ) else 'Release'
sys.path.append(bin_folder)
from .common.lazy_tensor import LazyTensor, Vi, Vj, Pm