Work around the prange non-resolution
prange is not resolved when used in a cypclass.
Co-authored-by: Xavier Thompson <xavier.thompson@nexedi.com>
Showing
-
Maintainer
This compiles but blocks at runtime. Might this problem be due to improper interactions between OpenMP threads and Cython+ runtime threads?
A similar unresolved issue exists for OpenMP: https://github.com/xianyi/OpenBLAS/issues/3187
Script to reproduce the problem:
import kdtree import numpy as np if __name__ == "__main__": X = np.load("X.npy") tree = kdtree.KDTree(X, leaf_size=256) n_query = X.shape[0] // 10 k = 1 Y = np.random.rand(n_query, X.shape[1]) knn_indices = np.zeros((n_query, k), dtype=np.int32) knn_distances = np.zeros((n_query, k), dtype=np.float64) tree.query(Y, knn_indices, knn_distances)
Please register or sign in to comment