From 37ed68c0ee5a8339eda46976ee1fe3b774d64c2e Mon Sep 17 00:00:00 2001 From: Ruihang Lai Date: Sat, 23 Mar 2024 21:10:27 -0400 Subject: [PATCH] [Contrib] Remove thrust "built but not used" warning 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 7fe0077c2b42..8f3178429589 100644 --- a/python/tvm/contrib/thrust.py +++ b/python/tvm/contrib/thrust.py @@ -21,8 +21,6 @@ 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.")