From 49c901f9f5f69dcfff3c875fb838e319350f002d Mon Sep 17 00:00:00 2001 From: Hussein Taher <6496177+Husenap@users.noreply.github.com> Date: Sun, 7 Jul 2024 13:25:37 +0000 Subject: [PATCH] Fix outdated call to DeclExternBuffer in make_extern --- include/tvm/topi/detail/extern.h | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/include/tvm/topi/detail/extern.h b/include/tvm/topi/detail/extern.h index e6a98162d318..87fa2c06fe26 100644 --- a/include/tvm/topi/detail/extern.h +++ b/include/tvm/topi/detail/extern.h @@ -36,21 +36,6 @@ namespace detail { using namespace tvm::te; -/*! - * \brief Construct a buffer to pass to an external function - * - * \param shape The shape of the buffer - * \param dtype The type of the buffer elements - * \param name The name of the buffer - * - * \return The Buffer object - */ -inline Buffer DeclExternBuffer(Array shape, DataType dtype, std::string name) { - auto data = var(name, DataType::Handle()); - auto elem_offset = PrimExpr(); - return Buffer(data, dtype, shape, Array(), elem_offset, name, -1, 0, kDefault); -} - /*! * \brief A function which constructs an Expr representing the invocation of an external * function. The function expects two arguments: an array of Buffers holding the input @@ -84,11 +69,11 @@ inline Array make_extern(const Array>& out_shapes, Array input_placeholders; for (auto t : inputs) { - input_placeholders.push_back(DeclExternBuffer(t->shape, t->dtype, t->op->name)); + input_placeholders.push_back(tvm::tir::decl_buffer(t->shape, t->dtype, t->op->name)); } Array output_placeholders; for (size_t i = 0; i < out_shapes.size(); ++i) { - output_placeholders.push_back(DeclExternBuffer(out_shapes[i], out_types[i], name)); + output_placeholders.push_back(tvm::tir::decl_buffer(out_shapes[i], out_types[i], name)); } auto body = fextern(input_placeholders, output_placeholders);