mbs-octoml commented on a change in pull request #9130: URL: https://github.com/apache/tvm/pull/9130#discussion_r717011728
########## File path: include/tvm/relay/attrs/function.h ########## @@ -1,66 +0,0 @@ -/* - * 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. - */ - -/*! - * \file tvm/relay/attrs/function.h - * \brief Attributes for Relay Functions which don't make sense on PrimFuncs. - */ -#ifndef TVM_RELAY_ATTRS_FUNCTION_H_ -#define TVM_RELAY_ATTRS_FUNCTION_H_ - -namespace tvm { -namespace relay { -/*! - * \brief Attributes for Relay function definitions which capture the devices for the - * function parameters and result. - * - * See also OnDeviceAttrs in include/tvm/relay/attrs/annotation.h for the companion "on_device" - * call attributes. - */ -struct FunctionOnDeviceAttrs : public tvm::AttrsNode<FunctionOnDeviceAttrs> { Review comment: On principle it would be nice if IRModule can be round tripped via the text form (both starting from text and starting from IRModule), so we'll need to push the attrs field addition into the parser/pretty printer. Ideally that would just be a matter of calling ParseAttrs as we already do for function calls, but yeah there's no support for anything other than primitive literals in that. I'll admit that pushes me more towards introducing a CompilerConfig class to collect targets etc and passing it explicitly rather than embedding it in the IRModule. Maybe take that back to #29? -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
