File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 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() {
178178 int major_version = 0 ;
179179 size_t version_length = 0 ;
180180 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 ' );
182182 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 ()));
184184 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 ()) {
186186 major_version = parsed_value;
187187 }
188188 }
You can’t perform that action at this time.
0 commit comments