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

Method text

tensorflow/stream_executor/kernel_spec.cc:121–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121const char *CudaPtxInMemory::text(int compute_capability_major,
122 int compute_capability_minor) const {
123 std::tuple<int, int> capability{compute_capability_major,
124 compute_capability_minor};
125
126 auto ptx_iter = ptx_by_compute_capability_.find(capability);
127 if (ptx_iter == ptx_by_compute_capability_.end()) {
128 return nullptr;
129 }
130
131 absl::MutexLock lock(&mu_);
132
133 // Check if there is an entry in decompressed ptx table.
134 auto decompressed_ptx_iter = decompressed_ptx_.find(ptx_iter->second);
135 if (decompressed_ptx_iter != decompressed_ptx_.end()) {
136 // If the decompressed string is empty, which means the ptx hasn't been
137 // decompressed, decompress it here.
138 if (decompressed_ptx_iter->second.empty()) {
139 decompressed_ptx_iter->second = DecompressPtx(ptx_iter->second);
140 }
141 return decompressed_ptx_iter->second.c_str();
142 }
143 return ptx_iter->second;
144}
145
146const char *CudaPtxInMemory::original_text(int compute_capability_major,
147 int compute_capability_minor) const {

Callers 4

testTextSummaryMethod · 0.80
GetKernelMethod · 0.80
InitializeMethod · 0.80

Calls 4

c_strMethod · 0.80
findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected