zxybazh commented on code in PR #15823:
URL: https://github.com/apache/tvm/pull/15823#discussion_r1340704043
##########
src/tir/transforms/default_gpu_schedule.cc:
##########
@@ -98,24 +98,48 @@ IRModule MarkScheduled(const IRModule& mod) {
mod->type_definitions, // type_definitions
mod->import_set_, // import_set
mod->source_map, // map
- mod->attrs); // attrs);
+ mod->attrs, // attrs
+ mod->global_infos); // global_infos
+}
+
+bool IsScheduledOnGPU(const BaseFunc& func) {
+ Optional<tvm::Target> target =
func->attrs.GetAttr<tvm::Target>(tvm::attr::kTarget);
+ if (target.defined()) {
Review Comment:
Do we need to also check target from context here, i.e., GPU target defined
in context but not in the function attribute?
--
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]