tkonolige commented on a change in pull request #8121: URL: https://github.com/apache/tvm/pull/8121#discussion_r638950307
########## File path: src/tir/schedule/error.h ########## @@ -0,0 +1,58 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +#ifndef TVM_TIR_SCHEDULE_ERROR_H_ +#define TVM_TIR_SCHEDULE_ERROR_H_ + +#include <tvm/tir/schedule/state.h> + +namespace tvm { +namespace tir { + +/*! \brief Error that happens during TensorIR scheduling */ +class ScheduleError : public tvm::runtime::Error { + public: + /*! \brief Base constructor */ + ScheduleError() : tvm::runtime::Error("") {} + /*! \brief The schedule primitive applied that causes the error */ + virtual String primitive() const = 0; + /*! \brief The IRModule that is applied on */ + virtual IRModule mod() const = 0; + /*! \brief The locations of interest that we want to point out */ + virtual Array<ObjectRef> LocationsOfInterest() const = 0; + /*! + * \brief Returns an error string template for rendering, corresponds to the "detail" mode. + * \sa ScheduleErrorRenderLevel + * \note Format of the template: + * "Some normal error string and curly bracket-enclosed numbers like {0}, which indicates the + * 0-th element of the interested location." Review comment: The explanation you've provided here is good. Can you put it in the comment? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
