Skip to content

Commit 997c57a

Browse files
committed
Bugfix
1 parent 5b17dab commit 997c57a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/meta_schedule/space_generator/space_generator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ std::string GetRISCVMarchFromTarget(const Target& target) {
101101
int GetRISCVVLENFromCTarget(const Target& target) {
102102
auto march = GetRISCVMarchFromTarget(target);
103103
int vlen = 0;
104-
if (tvm::runtime::regex_match(march, "zvl(\\d+)b")) {
104+
if (march.find("zvl") != std::string::npos) {
105105
vlen = tvm::target::parsers::cpu::extractVLENFromString(march);
106106
}
107107
return vlen;

src/target/parsers/aprofile.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ int FindRISCVVLEN(Map<String, String> features) {
8686
int vlen = 128;
8787
for (auto const& feature : features) {
8888
std::string feature_str = Downcast<String>(feature.first);
89-
if (tvm::runtime::regex_match(feature_str, "zvl(\\d+)b")) {
89+
if (feature_str.find("zvl") != std::string::npos) {
9090
vlen = tvm::target::parsers::cpu::extractVLENFromString(feature_str);
9191
}
9292
}

0 commit comments

Comments
 (0)