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

Method default_text

tensorflow/stream_executor/kernel_spec.cc:92–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90}
91
92const char *CudaPtxInMemory::default_text() const {
93 if (ptx_by_compute_capability_.empty()) {
94 return nullptr;
95 }
96
97 absl::MutexLock lock(&mu_);
98
99 auto ptx = ptx_by_compute_capability_.begin()->second;
100 // Check if there is an entry in decompressed ptx table.
101 auto decompressed_ptx_iter = decompressed_ptx_.find(ptx);
102 if (decompressed_ptx_iter != decompressed_ptx_.end()) {
103 // If the decompressed string is empty, which means the ptx hasn't been
104 // decompressed, decompress it here.
105 if (decompressed_ptx_iter->second.empty()) {
106 decompressed_ptx_iter->second = DecompressPtx(ptx);
107 }
108 return decompressed_ptx_iter->second.c_str();
109 }
110 return ptx;
111}
112
113const char *CudaPtxInMemory::original_default_text() const {
114 if (ptx_by_compute_capability_.empty()) {

Callers 1

GetKernelMethod · 0.80

Calls 5

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

Tested by

no test coverage detected