File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -178,11 +178,11 @@ static ggml_cuda_device_info ggml_cuda_init() {
178
178
int major_version = 0 ;
179
179
size_t version_length = 0 ;
180
180
if (rocblas_get_version_string_size (&version_length) == rocblas_status_success) {
181
- std::string version (version_length, ' \0 ' );
181
+ std::vector< char > version (version_length+ 1 , ' \0 ' );
182
182
if (rocblas_get_version_string (version.data (), version.size ()) == rocblas_status_success) {
183
- version.resize (::strlen (version.c_str ()));
183
+ version.resize (::strlen (version.data ()));
184
184
int parsed_value = 0 ;
185
- if (std::from_chars (version.c_str (), version.c_str () + version.length (), parsed_value).ec == std::errc ()) {
185
+ if (std::from_chars (version.data (), version.data () + version.size (), parsed_value).ec == std::errc ()) {
186
186
major_version = parsed_value;
187
187
}
188
188
}
You can’t perform that action at this time.
0 commit comments