Mousius commented on a change in pull request #9130:
URL: https://github.com/apache/tvm/pull/9130#discussion_r717373345
##########
File path: src/relay/op/annotation/annotation.cc
##########
@@ -92,6 +91,7 @@ RELAY_REGISTER_OP("on_device")
.add_argument("data", "Tensor", "The input data.")
.set_support_level(10)
.add_type_rel("Identity", IdentityRel)
+ .set_attrs_type_key("relay.attrs.OnDeviceAttrs")
Review comment:
Ahhh, how very exciting :+1:
##########
File path: python/tvm/parser/__init__.py
##########
@@ -26,8 +26,10 @@ def add(self, name, content):
return _ffi.get_global_func("SourceMapAdd")(self, name, content)
-def parse(source, source_name="from_string"):
- return _ffi_api.ParseModule(source_name, source)
+def parse(source, source_name="from_string", init_module=None,
init_meta_table=None):
+ if init_meta_table is None:
Review comment:
I'd suggest the language behaviour is the silly part? :+1:
##########
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:
Mhm, not a discussion for here, and I'm fairly sure we can adopt it
later if necessary - even if it's not carved into the stone tablet of the RFC.
--
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]