Changeset View
Changeset View
Standalone View
Standalone View
intern/cycles/device/hip/device.cpp
| Show First 20 Lines • Show All 157 Lines • ▼ Show 20 Lines | info.id = string_printf("HIP_%s_%04x:%02x:%02x", | ||||
| name, | name, | ||||
| (unsigned int)pci_location[0], | (unsigned int)pci_location[0], | ||||
| (unsigned int)pci_location[1], | (unsigned int)pci_location[1], | ||||
| (unsigned int)pci_location[2]); | (unsigned int)pci_location[2]); | ||||
| /* If device has a kernel timeout and no compute preemption, we assume | /* If device has a kernel timeout and no compute preemption, we assume | ||||
| * it is connected to a display and will freeze the display while doing | * it is connected to a display and will freeze the display while doing | ||||
| * computations. */ | * computations. */ | ||||
| int timeout_attr = 0, preempt_attr = 0; | int timeout_attr = 0; | ||||
| hipDeviceGetAttribute(&timeout_attr, hipDeviceAttributeKernelExecTimeout, num); | hipDeviceGetAttribute(&timeout_attr, hipDeviceAttributeKernelExecTimeout, num); | ||||
| if (timeout_attr && !preempt_attr) { | if (timeout_attr) { | ||||
| VLOG_INFO << "Device is recognized as display."; | VLOG_INFO << "Device is recognized as display."; | ||||
| info.description += " (Display)"; | info.description += " (Display)"; | ||||
| info.display_device = true; | info.display_device = true; | ||||
| display_devices.push_back(info); | display_devices.push_back(info); | ||||
| } | } | ||||
| else { | else { | ||||
| VLOG_INFO << "Device has compute preemption or is not used for display."; | VLOG_INFO << "Device has compute preemption or is not used for display."; | ||||
| devices.push_back(info); | devices.push_back(info); | ||||
| ▲ Show 20 Lines • Show All 94 Lines • Show Last 20 Lines | |||||