diff --git a/python/taichi/core/util.py b/python/taichi/core/util.py index 89956126503af..79ddc6531d14e 100644 --- a/python/taichi/core/util.py +++ b/python/taichi/core/util.py @@ -30,7 +30,7 @@ def import_ti_core(tmp_dir=None): global ti_core if get_os_name() != 'win': old_flags = sys.getdlopenflags() - sys.setdlopenflags(2) # 2 = RTLD_NOW + sys.setdlopenflags(2 | 8) # RTLD_NOW | RTLD_DEEPBIND else: pyddir = os.path.join(package_root(), 'lib') os.environ['PATH'] += ';' + pyddir diff --git a/taichi/backends/opengl/opengl_api.cpp b/taichi/backends/opengl/opengl_api.cpp index d466d1bc25ae4..1cdc0eb16648c 100644 --- a/taichi/backends/opengl/opengl_api.cpp +++ b/taichi/backends/opengl/opengl_api.cpp @@ -322,7 +322,7 @@ bool initialize_opengl(bool error_tolerance) { desc = "Unknown Error"; if (error_tolerance) { // error tolerated, returning false - TI_TRACE("[glsl] cannot create GLFW window: error {}: {}", status, desc); + TI_DEBUG("[glsl] cannot create GLFW window: error {}: {}", status, desc); supported = std::make_optional(false); return false; } diff --git a/taichi/ir/expr.cpp b/taichi/ir/expr.cpp index 083b9fe6e1490..20ea0cd594fbe 100644 --- a/taichi/ir/expr.cpp +++ b/taichi/ir/expr.cpp @@ -179,7 +179,9 @@ Expr load(const Expr &ptr) { Expr ptr_if_global(const Expr &var) { if (var.is()) { // singleton global variable - TI_ASSERT(var.snode()->num_active_indices == 0); + TI_ASSERT_INFO( + var.snode()->num_active_indices == 0, + "Please always use 'x[None]' (instead of simply 'x') to access any 0-D tensor." return var[ExprGroup()]; } else { // may be any local or global expr