| 621 | } |
| 622 | |
| 623 | bool Symbol::setDeviceKernel(const Device& device, const device::Kernel* func) { |
| 624 | if (deviceKernels_.size() == 0 || |
| 625 | // Always pick the most recent version in MGPU case |
| 626 | (func->signature().version() > signature_.version())) { |
| 627 | signature_ = func->signature(); |
| 628 | } |
| 629 | deviceKernels_[&device] = func; |
| 630 | return true; |
| 631 | } |
| 632 | |
| 633 | const device::Kernel* Symbol::getDeviceKernel(const Device& device) const { |
| 634 | auto it = deviceKernels_.find(&device); |