fzi-peccia commented on code in PR #18182:
URL: https://github.com/apache/tvm/pull/18182#discussion_r2281644926
##########
src/meta_schedule/space_generator/space_generator.cc:
##########
@@ -43,6 +45,9 @@ String GetRuleKindFromTarget(const Target& target) {
TargetJSON target_json =
target::parsers::aprofile::ParseTarget(target->Export());
TargetFeatures afeatures =
Downcast<TargetFeatures>(target_json.at("features"));
+ if (Downcast<Bool>(afeatures.at("has_rvv"))) {
+ return "rvv";
+ }
Review Comment:
Fixed in 918d22e6b5b031758edea180e76f1d0a23573f04
##########
src/meta_schedule/space_generator/space_generator.cc:
##########
@@ -83,6 +88,31 @@ String GetRuleKindFromTarget(const Target& target) {
throw;
}
+std::string GetRISCVMarchFromTarget(const Target& target) {
+ if (target->kind->name == "c") {
+ if (Optional<String> opt_march = target->GetAttr<String>("march")) {
+ return opt_march.value();
+ }
+ }
+ return "";
+}
+
+int GetRISCVVLENFromCTarget(const Target& target) {
+ auto march = GetRISCVMarchFromTarget(target);
+ int vlen = 0;
+ if (march.find("zvl") != std::string::npos) {
+ vlen = tvm::target::parsers::cpu::extractVLENFromString(march);
+ }
+ return vlen;
+}
Review Comment:
Fixed in 918d22e6b5b031758edea180e76f1d0a23573f04
--
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]