Skip to content

Commit

Permalink
Turn ScopedActivateExecutorContext into an alias to ScopedActivateCon…
Browse files Browse the repository at this point in the history
…text to ease its deprecation.

PiperOrigin-RevId: 674001373
  • Loading branch information
klucke authored and Google-ML-Automation committed Sep 12, 2024
1 parent 4aee555 commit 773389c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 67 deletions.
6 changes: 0 additions & 6 deletions xla/stream_executor/gpu/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,9 @@ xla_cc_test(

gpu_only_cc_library(
name = "gpu_activation",
srcs = ["gpu_activation.cc"],
hdrs = ["gpu_activation.h"],
deps = [
":context",
":gpu_activation_header",
":gpu_driver_header",
":gpu_executor_header",
":scoped_activate_context",
"//xla/stream_executor",
],
)

Expand Down
41 changes: 0 additions & 41 deletions xla/stream_executor/gpu/gpu_activation.cc

This file was deleted.

21 changes: 1 addition & 20 deletions xla/stream_executor/gpu/gpu_activation.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,7 @@ class StreamExecutor;

namespace gpu {

class GpuExecutor;

// Activates a context within an enclosing scope.
class ScopedActivateExecutorContext {
public:
// Form that takes a GPU executor.
explicit ScopedActivateExecutorContext(GpuExecutor* gpu_exec);

// Form that takes an executor and extracts a GPU Executor --
// fatal failure if it is not a GPU executor.
explicit ScopedActivateExecutorContext(StreamExecutor* stream_exec);

~ScopedActivateExecutorContext();

private:
ScopedActivateContext* driver_scoped_activate_context_;

ScopedActivateExecutorContext(const ScopedActivateExecutorContext&) = delete;
void operator=(const ScopedActivateExecutorContext&) = delete;
};
using ScopedActivateExecutorContext = ScopedActivateContext;

} // namespace gpu
} // namespace stream_executor
Expand Down

0 comments on commit 773389c

Please sign in to comment.