aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--tensorflow/compiler/xla/service/gpu/gpu_executable.cc4
-rw-r--r--tensorflow/stream_executor/module_spec.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/tensorflow/compiler/xla/service/gpu/gpu_executable.cc b/tensorflow/compiler/xla/service/gpu/gpu_executable.cc
index 52c8595ffb..0179b43240 100644
--- a/tensorflow/compiler/xla/service/gpu/gpu_executable.cc
+++ b/tensorflow/compiler/xla/service/gpu/gpu_executable.cc
@@ -190,7 +190,9 @@ GpuExecutable::ResolveConstantGlobals(se::StreamExecutor* executor) {
}
se::MultiModuleLoaderSpec module_spec;
- module_spec.AddCudaCubinInMemory(cubin());
+ if (!cubin().empty()) {
+ module_spec.AddCudaCubinInMemory(cubin());
+ }
module_spec.AddCudaPtxInMemory(ptx().c_str());
tensorflow::gtl::FlatMap<int64, se::DeviceMemoryBase> globals;
diff --git a/tensorflow/stream_executor/module_spec.h b/tensorflow/stream_executor/module_spec.h
index 212ae7ba9c..75bdfed2d7 100644
--- a/tensorflow/stream_executor/module_spec.h
+++ b/tensorflow/stream_executor/module_spec.h
@@ -43,6 +43,7 @@ class MultiModuleLoaderSpec {
}
void AddCudaCubinInMemory(port::ArraySlice<const uint8> cubin_bytes) {
+ CHECK(!cubin_bytes.empty());
has_cuda_cubin_in_memory_ = true;
cuda_cubin_in_memory_ = cubin_bytes;
}