You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by tq...@apache.org on 2024/03/24 18:07:42 UTC

(tvm) branch main updated: [Contrib] Remove thrust "built but not used" warning (#16776)

This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new d79b1dd955 [Contrib] Remove thrust "built but not used" warning (#16776)
d79b1dd955 is described below

commit d79b1dd955fbc10fcb9bdf5c9b68061c6cae4385
Author: Ruihang Lai <ru...@cs.cmu.edu>
AuthorDate: Sun Mar 24 14:07:36 2024 -0400

    [Contrib] Remove thrust "built but not used" warning (#16776)
    
    There has been a warning saying "Thrust is enabled when building TVM
    but is not specified in the input target" for years, while it is
    totally fine that the target does not contain thrust in `libs`, in
    which case we just do not dispatch.
    
    This PR removes the warning.
---
 python/tvm/contrib/thrust.py | 2 --
 1 file changed, 2 deletions(-)

diff --git a/python/tvm/contrib/thrust.py b/python/tvm/contrib/thrust.py
index 7fe0077c2b..8f31784295 100644
--- a/python/tvm/contrib/thrust.py
+++ b/python/tvm/contrib/thrust.py
@@ -21,8 +21,6 @@ from tvm._ffi import get_global_func
 
 
 def maybe_warn(target, func_name):
-    if get_global_func(func_name, allow_missing=True) and not "thrust" in target.libs:
-        logging.warning("TVM is built with thrust but thrust is not used.")
     if "thrust" in target.libs and get_global_func(func_name, allow_missing=True) is None:
         logging.warning("thrust is requested but TVM is not built with thrust.")