MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Reinitialize

Function Reinitialize

tensorflow/core/common_runtime/gpu/gpu_device.cc:124–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls 5

IsEnabledFunction · 0.85
TfToPlatformGpuIdFunction · 0.85
nameMethod · 0.65
step_idMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected