Skip to content

Commit ce023f6

Browse files
authored
add device version in device list (ggml-org#6959)
Co-authored-by: arthw <>
1 parent 6e472f5 commit ce023f6

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

ggml-sycl.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13416,21 +13416,27 @@ void print_device_detail(int id, sycl::device &device, std::string device_type)
1341613416
version += std::to_string(prop.get_minor_version());
1341713417

1341813418
device_type = std::regex_replace(device_type, std::regex("ext_oneapi_"), "");
13419+
std::string name = std::string(prop.get_name());
13420+
name = std::regex_replace(name, std::regex("\\(R\\)"), "");
13421+
name = std::regex_replace(name, std::regex("\\(TM\\)"), "");
1341913422

13420-
fprintf(stderr, "|%2d|%18s|%45s|%10s|%11d|%8d|%7d|%15lu|\n", id, device_type.c_str(),
13421-
prop.get_name(), version.c_str(), prop.get_max_compute_units(),
13423+
auto global_mem_size = prop.get_global_mem_size()/1000000;
13424+
13425+
fprintf(stderr, "|%2d|%19s|%39s|%7s|%7d|%8d|%5d|%6luM|%21s|\n", id, device_type.c_str(),
13426+
name.c_str(), version.c_str(), prop.get_max_compute_units(),
1342213427
prop.get_max_work_group_size(), prop.get_max_sub_group_size(),
13423-
prop.get_global_mem_size());
13428+
global_mem_size, device.get_info<sycl::info::device::driver_version>().c_str());
1342413429
}
1342513430

1342613431
void ggml_backend_sycl_print_sycl_devices() {
1342713432
GGML_SYCL_DEBUG("[SYCL] call ggml_backend_sycl_print_sycl_devices\n");
1342813433
int device_count = dpct::dev_mgr::instance().device_count();
1342913434
std::map<std::string, size_t> DeviceNums;
1343013435
fprintf(stderr, "found %d SYCL devices:\n", device_count);
13431-
fprintf(stderr, "| | | |Compute |Max compute|Max work|Max sub| |\n");
13432-
fprintf(stderr, "|ID| Device Type| Name|capability|units |group |group |Global mem size|\n");
13433-
fprintf(stderr, "|--|------------------|---------------------------------------------|----------|-----------|--------|-------|---------------|\n");
13436+
fprintf(stderr, "| | | | |Max | |Max |Global | |\n");
13437+
fprintf(stderr, "| | | | |compute|Max work|sub |mem | |\n");
13438+
fprintf(stderr, "|ID| Device Type| Name|Version|units |group |group|size | Driver version|\n");
13439+
fprintf(stderr, "|--|-------------------|---------------------------------------|-------|-------|--------|-----|-------|---------------------|\n");
1343413440
for (int id = 0; id < device_count; ++id) {
1343513441
sycl::device device = dpct::dev_mgr::instance().get_device(id);
1343613442
sycl::backend backend = device.get_backend();

0 commit comments

Comments
 (0)