lhutton1 commented on code in PR #16425:
URL: https://github.com/apache/tvm/pull/16425#discussion_r1457336242
##########
src/target/llvm/llvm_instance.cc:
##########
@@ -845,10 +847,11 @@ const Array<String>
LLVMTargetInfo::GetAllLLVMCpuFeatures() const {
#else
MCInfo->getAllProcessorFeatures();
#endif
- Array<String> cpu_features;
+ // TVM doesn't have an FFI friendly Set, so use a Map instead for now
+ Map<String, String> cpu_features;
Review Comment:
Good point thanks, I'd forgotten to check this. Due to the restriction on
the FFI, perhaps we can fix this on the python side? For example:
```
feature_map = _ffi_api.llvm_get_cpu_features(target)
return set(feature_map.keys())
```
We could also use std::set for the c++ API if desired, we'd just have to
make the conversion to/from Map before/after crossing the FFI boundary.
--
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]