Skip to content

Commit

Permalink
[llvm] Further improve LLVM 10 compatibility by using RTLD_DEEPBIND (t…
Browse files Browse the repository at this point in the history
…aichi-dev#1355)

* [misc] Further improve libLLVM-10.so compatibility by using RTLD_DEEPBIND

* off-topic

* [skip ci] enforce code format

* improve error message

* [skip ci] enforce code format

* [skip ci] Update taichi/ir/expr.cpp

Co-authored-by: Yuanming Hu <[email protected]>

Co-authored-by: Taichi Gardener <[email protected]>
Co-authored-by: Yuanming Hu <[email protected]>
  • Loading branch information
3 people authored Jul 2, 2020
1 parent 7438545 commit 8faf2b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/taichi/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion taichi/backends/opengl/opengl_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<bool>(false);
return false;
}
Expand Down
4 changes: 3 additions & 1 deletion taichi/ir/expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,9 @@ Expr load(const Expr &ptr) {
Expr ptr_if_global(const Expr &var) {
if (var.is<GlobalVariableExpression>()) {
// 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
Expand Down

0 comments on commit 8faf2b2

Please sign in to comment.