diff --git a/src/runtime/vulkan/vulkan_device_api.cc b/src/runtime/vulkan/vulkan_device_api.cc index 1c190f313aba..3d27e1651852 100644 --- a/src/runtime/vulkan/vulkan_device_api.cc +++ b/src/runtime/vulkan/vulkan_device_api.cc @@ -122,7 +122,7 @@ void VulkanDeviceAPI::GetAttr(Device dev, DeviceAttrKind kind, TVMRetValue* rv) break; } case kDeviceName: - *rv = String(prop.device_name); + *rv = std::string(prop.device_name); break; case kMaxClockRate: @@ -237,7 +237,10 @@ void VulkanDeviceAPI::GetTargetProperty(Device dev, const std::string& property, *rv = int64_t(prop.max_shared_memory_per_block); } if (property == "device_name") { - *rv = String(prop.device_name); + *rv = prop.device_name; + } + if (property == "device_type") { + *rv = prop.device_type; } if (property == "driver_version") { *rv = int64_t(prop.driver_version); diff --git a/src/target/target.cc b/src/target/target.cc index 50067d459b34..a2a10da6d79a 100644 --- a/src/target/target.cc +++ b/src/target/target.cc @@ -169,7 +169,7 @@ static Optional JoinString(const std::vector& array, char separa } else { os << quote; for (char c : str) { - if (c == separator || c == quote) { + if (c == quote) { os << escape; } os << c; @@ -781,7 +781,7 @@ ObjectPtr TargetInternal::FromConfig(std::unordered_map