| 122 | } |
| 123 | ~EigenGpuStreamDevice() override {} |
| 124 | void Reinitialize(OpKernelContext* context, const gpuStream_t* gpu_stream, |
| 125 | TfGpuId tf_gpu_id, ::tensorflow::Allocator* alloc, |
| 126 | char* scratch) { |
| 127 | if (LogMemory::IsEnabled()) { |
| 128 | operation_ = context->op_kernel().name() + "/EigenAllocator"; |
| 129 | step_id_ = context->step_id(); |
| 130 | } |
| 131 | context_ = context; |
| 132 | scratch_ = scratch; |
| 133 | semaphore_ = |
| 134 | reinterpret_cast<unsigned int*>(scratch + Eigen::kGpuScratchSize); |
| 135 | stream_ = gpu_stream; |
| 136 | allocator_ = alloc; |
| 137 | PlatformGpuId platform_gpu_id; |
| 138 | TF_CHECK_OK(GpuIdManager::TfToPlatformGpuId(tf_gpu_id, &platform_gpu_id)); |
| 139 | device_prop_ = &Eigen::m_deviceProperties[platform_gpu_id.value()]; |
| 140 | } |
| 141 | |
| 142 | const gpuStream_t& stream() const override { return *stream_; } |
| 143 | const gpuDeviceProp_t& deviceProperties() const override { |
nothing calls this directly
no test coverage detected