microsoft / tensorflow-directml-plugin

DirectML PluggableDevice plugin for TensorFlow 2
Apache License 2.0
185 stars 25 forks source link

Fix the adapter description on Linux #263

Closed PatriceVignola closed 2 years ago

PatriceVignola commented 2 years ago

IDXCoreAdapter::GetPropertySize(DXCoreAdapterProperty::DriverDescription, &driver_description_size) returns the size of the string including the null terminating character, but the string that we pass to std::string shouldn't contain a terminating character. Therefore, after retrieving the adapter description, we need to remove the last character.