Skip to content

Commit

Permalink
[stream_executor] NFC: Remove internal API uses outside of StreamExec…
Browse files Browse the repository at this point in the history
…utor package

PiperOrigin-RevId: 573401361
  • Loading branch information
ezhulenev authored and tensorflower-gardener committed Oct 14, 2023
1 parent 0acfec1 commit 9ff124f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ extern "C" void _mlir_ciface_tf_launch_kernel(void *ctx, void *module_blob,
// Get the GPU module.
stream_executor::Stream *se_stream =
op_kernel_ctx->op_device_context()->stream();
void *stream = se_stream->implementation()->GpuStreamHack();
void *stream = se_stream->platform_specific_handle().stream;
GPURuntimeCache::GPUModule module = cache->LookupOrLoadModule(module_blob);
GPURuntimeCache::GPUFunction function =
cache->LookupOrGetFunction(module, kernel_name);
Expand Down
2 changes: 1 addition & 1 deletion third_party/xla/xla/stream_executor/cuda/cuda_executor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ Event::Status GpuExecutor::PollForEventStatus(Event* event) {
bool GpuExecutor::AllocateStream(Stream* stream) {
absl::MutexLock l(&alive_gpu_streams_mu_);
bool out = AsGpuStream(stream)->Init();
alive_gpu_streams_[stream->implementation()->GpuStreamHack()] = stream;
alive_gpu_streams_[stream->platform_specific_handle().stream] = stream;
return out;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ TEST_F(StreamSearchTest, FoundPrevExecutor) {
Stream s2(*executor);
s2.Init();

void* gpu_ptr = s.implementation()->GpuStreamHack();
void* gpu_ptr_2 = s2.implementation()->GpuStreamHack();
void* gpu_ptr = s.platform_specific_handle().stream;
void* gpu_ptr_2 = s2.platform_specific_handle().stream;

StreamExecutorConfig c;
c.gpu_stream = gpu_ptr;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ Event::Status GpuExecutor::PollForEventStatus(Event* event) {
bool GpuExecutor::AllocateStream(Stream* stream) {
absl::MutexLock l(&alive_gpu_streams_mu_);
bool out = AsGpuStream(stream)->Init();
alive_gpu_streams_[stream->implementation()->GpuStreamHack()] = stream;
alive_gpu_streams_[stream->platform_specific_handle().stream] = stream;
return out;
}

Expand Down

0 comments on commit 9ff124f

Please sign in to comment.