Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions xls/build_rules/tests/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "add_one_dslx_ir",
dslx_top = "main",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":add_one_dslx",
)

Expand Down
4 changes: 3 additions & 1 deletion xls/dslx/ir_convert/ir_converter_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ absl::Status RealMain(absl::Span<const std::string_view> paths) {
bool warnings_as_errors = ir_converter_options.warnings_as_errors();
bool type_inference_v2 = ir_converter_options.type_inference_v2();
bool lower_to_proc_scoped_channels =
ir_converter_options.lower_to_proc_scoped_channels();
ir_converter_options.has_lower_to_proc_scoped_channels()
? ir_converter_options.lower_to_proc_scoped_channels()
: false;
bool force_implicit_token_calling_convention =
ir_converter_options.force_implicit_token_calling_convention();
bool emit_trace = ir_converter_options.emit_trace();
Expand Down
9 changes: 8 additions & 1 deletion xls/dslx/ir_convert/ir_converter_options_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ absl::StatusOr<bool> SetOptionsFromFlags(IrConverterOptionsFlagsProto& proto) {
any_flags_set |= FLAGS_##__x.IsSpecifiedOnCommandLine(); \
proto.set_##__x(absl::GetFlag(FLAGS_##__x)); \
}
#define POPULATE_FLAG_IF_SPECIFIED(__x) \
{ \
if (FLAGS_##__x.IsSpecifiedOnCommandLine()) { \
any_flags_set = true; \
proto.set_##__x(absl::GetFlag(FLAGS_##__x)); \
} \
}
#define POPULATE_OPTIONAL_FLAG(__x) \
{ \
any_flags_set |= FLAGS_##__x.IsSpecifiedOnCommandLine(); \
Expand Down Expand Up @@ -143,7 +150,7 @@ absl::StatusOr<bool> SetOptionsFromFlags(IrConverterOptionsFlagsProto& proto) {
POPULATE_OPTIONAL_FLAG(interface_proto_file);
POPULATE_OPTIONAL_FLAG(interface_textproto_file);
POPULATE_FLAG(type_inference_v2);
POPULATE_FLAG(lower_to_proc_scoped_channels);
POPULATE_FLAG_IF_SPECIFIED(lower_to_proc_scoped_channels);
POPULATE_FLAG(force_implicit_token_calling_convention);
POPULATE_REPEATED_FLAG(configured_values);
POPULATE_FLAG(emit_assert);
Expand Down
1 change: 1 addition & 0 deletions xls/dslx/tests/trace_fmt_array/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "test_target",
dslx_top = "traceit",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":test_target_library",
)

Expand Down
14 changes: 5 additions & 9 deletions xls/examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -961,9 +961,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "delay_loopback_channel_ir",
dslx_top = "Delay",
ir_conv_args = {
"lower_to_proc_scoped_channels": "true",
},
ir_conv_args = {"lower_to_proc_scoped_channels": "true"},
ir_file = "delay_loopback_channel.ir",
library = ":delay_loopback_channel_dslx",
)
Expand Down Expand Up @@ -1048,6 +1046,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "constraint_ir",
dslx_top = "main",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "constraint.ir",
library = ":constraint_dslx",
)
Expand Down Expand Up @@ -1242,6 +1241,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "serialized_decomposer_ir",
dslx_top = "serialized_decomposer",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "serialized_decomposer.ir",
library = ":serialized_decomposer_dslx",
)
Expand Down Expand Up @@ -1391,19 +1391,15 @@ xls_dslx_test(
xls_dslx_ir(
name = "proc_network_ir",
dslx_top = "Initiator",
ir_conv_args = {
"lower_to_proc_scoped_channels": "false",
},
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "proc_network.ir",
library = ":proc_network_dslx",
)

xls_dslx_ir(
name = "proc_network_proc_scoped_ir",
dslx_top = "Initiator",
ir_conv_args = {
"lower_to_proc_scoped_channels": "true",
},
ir_conv_args = {"lower_to_proc_scoped_channels": "true"},
ir_file = "proc_network_proc_scoped.ir",
library = ":proc_network_dslx",
)
Expand Down
1 change: 1 addition & 0 deletions xls/examples/assertions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "assertions_ir",
dslx_top = "main",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "assertions.ir",
library = ":assertions_dslx",
)
Expand Down
2 changes: 2 additions & 0 deletions xls/examples/dslx_module/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ xls_dslx_ir(
name = "some_caps_streaming_configured_ir",
dslx_top = "some_caps_specialized",
ir_conv_args = {
"lower_to_proc_scoped_channels": "false",
# Set fifo config for multi-proc codegen.
# It needs to know what configuration to use for the fifo.
"default_fifo_config": "depth: 4, bypass: true, " +
Expand All @@ -91,6 +92,7 @@ xls_dslx_opt_ir(
# liveness instead of spawn tree. This is done to avoid having to deal with mangled names.
dslx_top = "manual_chan_caps_specialized",
ir_conv_args = {
"lower_to_proc_scoped_channels": "false",
# Set fifo config for multi-proc codegen.
# It needs to know what configuration to use for the fifo.
"default_fifo_config": "depth: 4, bypass: true, " +
Expand Down
1 change: 1 addition & 0 deletions xls/examples/parameterized/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "design_ir",
dslx_top = "design_top",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "design.ir",
library = "design_lib",
)
Expand Down
1 change: 1 addition & 0 deletions xls/examples/protobuf/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "verint_encode_ir",
dslx_top = "varint_encode_u32",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "varint_encode.ir",
library = ":varint_encode_dslx",
)
Expand Down
2 changes: 2 additions & 0 deletions xls/jit/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -1217,6 +1217,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "multi_function",
dslx_top = "multi_function_one",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":multi_function_dslx",
)

Expand Down Expand Up @@ -1285,6 +1286,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "multi_function_with_trace",
dslx_top = "multi_function_one",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":multi_function_with_trace_dslx",
)

Expand Down
2 changes: 2 additions & 0 deletions xls/jit/testdata/v1/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ xls_dslx_ir(
name = "test_ir",
srcs = ["test.x"],
dslx_top = "main",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
)

xls_dslx_ir(
name = "multi_proc_ir",
srcs = ["multi_proc.x"],
dslx_top = "proc_ten",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
)

xls_dslx_ir(
Expand Down
2 changes: 2 additions & 0 deletions xls/jit/testdata/v2/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ xls_dslx_ir(
name = "test_ir",
srcs = ["test.x"],
dslx_top = "main",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
)

xls_dslx_ir(
name = "multi_proc_ir",
srcs = ["multi_proc.x"],
dslx_top = "proc_ten",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
)

xls_dslx_ir(
Expand Down
5 changes: 5 additions & 0 deletions xls/modules/aes/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "aes_ctr",
dslx_top = "aes_ctr",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":aes_ctr_dslx",
)

Expand Down Expand Up @@ -112,6 +113,7 @@ cc_test(
xls_dslx_ir(
name = "aes_decrypt",
dslx_top = "decrypt",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":aes_dslx",
)

Expand All @@ -133,6 +135,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "aes_encrypt",
dslx_top = "encrypt",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":aes_dslx",
)

Expand Down Expand Up @@ -165,6 +168,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "aes_gcm",
dslx_top = "aes_gcm",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":aes_gcm_dslx",
)

Expand Down Expand Up @@ -231,6 +235,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "aes_ghash",
dslx_top = "ghash",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":ghash_dslx",
)

Expand Down
2 changes: 2 additions & 0 deletions xls/modules/rle/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "rle_enc_ir",
dslx_top = "RunLengthEncoder32",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "rle_enc.ir",
library = "rle_enc_dslx",
)
Expand Down Expand Up @@ -258,6 +259,7 @@ xls_dslx_test(
xls_dslx_ir(
name = "rle_dec_ir",
dslx_top = "RunLengthDecoder32",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
ir_file = "rle_dec.ir",
library = "rle_dec_dslx",
)
Expand Down
4 changes: 4 additions & 0 deletions xls/tools/testdata/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ xls_dslx_ir(
xls_dslx_ir(
name = "eval_proc_main_test_ir",
dslx_top = "test_proc",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":eval_proc_main_test",
)

Expand Down Expand Up @@ -166,6 +167,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "eval_proc_main_zero_size_test_ir",
dslx_top = "test_proc",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":eval_proc_main_zero_size_test",
)

Expand Down Expand Up @@ -246,6 +248,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "eval_proc_main_conditional_test_ir",
dslx_top = "test_proc",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":eval_proc_main_conditional_test",
)

Expand Down Expand Up @@ -339,6 +342,7 @@ xls_dslx_library(
xls_dslx_ir(
name = "eval_proc_main_test_memory",
dslx_top = "test_proc",
ir_conv_args = {"lower_to_proc_scoped_channels": "false"},
library = ":eval_proc_main_test_memory_lib",
)

Expand Down