Skip to content

Commit

Permalink
Rename StreamingJitBlockEvaluator to JitBlockEvaluator
Browse files Browse the repository at this point in the history
The other one was only for testing and is removed now.

PiperOrigin-RevId: 649230462
  • Loading branch information
allight authored and copybara-github committed Jul 3, 2024
1 parent 5118f14 commit 30f7e73
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion xls/codegen/block_execution_fuzz_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ class CustomScheduleFuzzer
if (kInterpreter) {
return kInterpreterBlockEvaluator.NewContinuation(b, resets).value();
}
return kStreamingJitBlockEvaluator.NewContinuation(b, resets).value();
return kJitBlockEvaluator.NewContinuation(b, resets).value();
}
};

Expand Down
2 changes: 1 addition & 1 deletion xls/jit/block_jit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ class BlockContinuationJitWrapper final : public BlockContinuation {
} // namespace

absl::StatusOr<std::unique_ptr<BlockContinuation>>
StreamingJitBlockEvaluator::MakeNewContinuation(
JitBlockEvaluator::MakeNewContinuation(
BlockElaboration&& elaboration,
const absl::flat_hash_map<std::string, Value>& initial_registers) const {
XLS_ASSIGN_OR_RETURN(auto jit, BlockJit::Create(elaboration));
Expand Down
9 changes: 3 additions & 6 deletions xls/jit/block_jit.h
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,9 @@ class BlockJitContinuation {

// A jit block evaluator that tries to use the jit's register saving as
// possible.
class StreamingJitBlockEvaluator : public BlockEvaluator {
class JitBlockEvaluator : public BlockEvaluator {
public:
constexpr StreamingJitBlockEvaluator() : BlockEvaluator("StreamingJit") {}

// Expose the overload without `initial_registers`.
using BlockEvaluator::NewContinuation;
constexpr JitBlockEvaluator() : BlockEvaluator("Jit") {}

protected:
absl::StatusOr<std::unique_ptr<BlockContinuation>> MakeNewContinuation(
Expand All @@ -277,7 +274,7 @@ class StreamingJitBlockEvaluator : public BlockEvaluator {
const override;
};

static const StreamingJitBlockEvaluator kStreamingJitBlockEvaluator;
static const JitBlockEvaluator kJitBlockEvaluator;

} // namespace xls

Expand Down
2 changes: 1 addition & 1 deletion xls/jit/block_jit_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ TEST_F(BlockJitTest, ExternInstantiationIsAnError) {

INSTANTIATE_TEST_SUITE_P(JitBlockCommonTest, BlockEvaluatorTest,
testing::Values(BlockEvaluatorTestParam{
.evaluator = &kStreamingJitBlockEvaluator,
.evaluator = &kJitBlockEvaluator,
.supports_fifos = false,
}),
[](const auto& v) {
Expand Down
2 changes: 1 addition & 1 deletion xls/tools/eval_proc_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,7 @@ static absl::Status RunBlock(

const BlockEvaluator& continuation_factory =
options.use_jit
? reinterpret_cast<const BlockEvaluator&>(kStreamingJitBlockEvaluator)
? reinterpret_cast<const BlockEvaluator&>(kJitBlockEvaluator)
: reinterpret_cast<const BlockEvaluator&>(kInterpreterBlockEvaluator);

XLS_ASSIGN_OR_RETURN(auto continuation,
Expand Down

0 comments on commit 30f7e73

Please sign in to comment.