You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by ju...@apache.org on 2022/06/15 17:03:55 UTC

[tvm] branch main updated: [MetaSchedule] Include te/tensor.h instead of forward declaring te::Tensor (#11731)

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

junrushao 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 a5df28332c [MetaSchedule] Include te/tensor.h instead of forward declaring te::Tensor (#11731)
a5df28332c is described below

commit a5df28332cbdb88320e591c4fe1fbc7294054a90
Author: Krzysztof Parzyszek <kp...@quicinc.com>
AuthorDate: Wed Jun 15 12:03:51 2022 -0500

    [MetaSchedule] Include te/tensor.h instead of forward declaring te::Tensor (#11731)
    
    ApplyHistoryBestNode declares an Array of Tensor. There are type traits
    used in Array that require that the element type is complete at the time
    of the declaration. With only a forward declaration compilation fails
    (clang 14.0.3, libc++).
---
 include/tvm/meta_schedule/apply_history_best.h | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/include/tvm/meta_schedule/apply_history_best.h b/include/tvm/meta_schedule/apply_history_best.h
index 82bb350e1c..3a8983012b 100644
--- a/include/tvm/meta_schedule/apply_history_best.h
+++ b/include/tvm/meta_schedule/apply_history_best.h
@@ -28,12 +28,7 @@
 #include <tvm/runtime/object.h>
 #include <tvm/runtime/packed_func.h>
 #include <tvm/target/target.h>
-
-namespace tvm {
-namespace te {
-class Tensor;
-}  // namespace te
-}  // namespace tvm
+#include <tvm/te/tensor.h>
 
 namespace tvm {
 namespace meta_schedule {