Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix offline generation after vectoriser and add ci #99

Merged
merged 13 commits into from
Jul 24, 2024

Conversation

katrinafyi
Copy link
Member

@katrinafyi katrinafyi commented Jul 16, 2024

fixes after #98.

@katrinafyi
Copy link
Member Author

Crashes in stage 7-8, but Elem[] operations should be inlined?

Stages 7-8: Offline Transform
  Error Failure("Missing operation: Elem.set")
Stages 7-8: Offline Transform
  Error Failure("Missing operation: Elem.set")
Raised at Stdlib.failwith in file "stdlib.ml", line 29, characters 17-33
Called from Stdlib__List.fold_left_map.aux in file "list.ml", line 276, characters 22-30
Called from LibASL_stage1__Offline_transform.let@ in file "libASL/offline_transform.ml", line 87, characters 14-17
Called from LibASL_stage1__Offline_transform.let@ in file "libASL/offline_transform.ml", line 87, characters 14-17
Called from Stdlib__List.fold_left_map.aux in file "list.ml", line 276, characters 22-30
Called from LibASL_stage1__Offline_transform.let+ in file "libASL/offline_transform.ml", line 90, characters 14-17
Called from LibASL_stage1__Offline_transform.branch_tf in file "libASL/offline_transform.ml", line 320, characters 19-32
Called from Stdlib__List.fold_left_map.aux in file "list.ml", line 276, characters 22-30
Called from LibASL_stage1__Offline_transform.let+ in file "libASL/offline_transform.ml", line 90, characters 14-17
Called from LibASL_stage1__Offline_transform.branch_tf in file "libASL/offline_transform.ml", line 320, characters 19-32
Called from Stdlib__List.fold_left_map.aux in file "list.ml", line 276, characters 22-30
Called from LibASL_stage1__Offline_transform.let+ in file "libASL/offline_transform.ml", line 90, characters 14-17
Called from LibASL_stage1__Offline_transform.branch_tf in file "libASL/offline_transform.ml", line 320, characters 19-32
Called from Stdlib__List.fold_left_map.aux in file "list.ml", line 276, characters 22-30
Called from LibASL_stage1__Offline_transform.let+ in file "libASL/offline_transform.ml", line 90, characters 14-17
Called from LibASL_stage1__Offline_transform.branch_tf in file "libASL/offline_transform.ml", line 321, characters 19-32
Called from Stdlib__List.fold_left_map.aux in file "list.ml", line 276, characters 22-30
Called from LibASL_stage1__Offline_transform.let+ in file "libASL/offline_transform.ml", line 90, characters 14-17
Called from LibASL_stage1__Offline_transform.branch_tf in file "libASL/offline_transform.ml", line 320, characters 19-32
Called from Stdlib__List.fold_left_map.aux in file "list.ml", line 276, characters 22-30
Called from LibASL_stage1__Offline_transform.let+ in file "libASL/offline_transform.ml", line 90, characters 14-17
Called from LibASL_stage1__Offline_transform.analysis.fun_fp in file "libASL/offline_transform.ml", line 423, characters 21-64
Called from LibASL_stage1__Offline_transform.analysis.fp.(fun) in file "libASL/offline_transform.ml", line 434, characters 15-54
Called from Stdlib__Set.Make.fold in file "set.ml", line 383, characters 34-55
Called from Stdlib__Set.Make.fold in file "set.ml", line 383, characters 39-54
Called from Stdlib__Set.Make.fold in file "set.ml", line 383, characters 39-54
Called from Stdlib__Set.Make.fold in file "set.ml", line 383, characters 39-54
Called from LibASL_stage1__Offline_transform.analysis.fp in file "libASL/offline_transform.ml", line 430, characters 39-482
Called from LibASL_stage1__Offline_transform.run in file "libASL/offline_transform.ml", line 926, characters 29-45
Called from LibASL_stage1__Symbolic_lifter.run in file "libASL/symbolic_lifter.ml", line 378, characters 20-49
Called from LibASL_stage1__Cpu.mkCPU.gen in file "libASL/cpu.ml", line 67, characters 54-86
Called from LibASL_stage1__LoadASL.report_parse_error in file "libASL/loadASL.ml", line 65, characters 8-12
Called from LibASL_stage1__LoadASL.report_type_error in file "libASL/loadASL.ml", line 83, characters 8-12
Called from Dune__exe__Asli.repl in file "bin/asli.ml", line 273, characters 12-318

Also reports failures in Stage 5: Disassembly. The bits_size_of_expr failures are new.

Stage 5: Disassembly
Error: aarch64_integer_arithmetic_mul_widening_32_64 Failure("bits_size_of_expr: no type known for If21__2")
Error: aarch64_integer_pac_pacga_dp_2src Failure("Casting unhandled value type to expression: {.NS = 1'0', .exceptype = Exception_PACTrap, .i...
Error: aarch64_system_exceptions_debug_exception File "libASL/dis.ml", line 1019, characters 8-14: Assertion failed
Error: aarch64_system_exceptions_runtime_smc Failure("Casting unhandled value type to expression: {.NS = 1'0', .exceptype = Exception_MonitorCall...
Error: aarch64_system_exceptions_runtime_svc Failure("Casting unhandled value type to expression: {.NS = 1'0', .exceptype = Exception_SupervisorC...
Error: aarch64_system_hints Failure("Casting unhandled value type to expression: {.NS = 1'0', .exceptype = Exception_WFxTrap, .i...
Error: aarch64_vector_arithmetic_binary_disparate_add_sub_wide Failure("bits_size_of_expr: no type known for If22__2")
Error: aarch64_vector_arithmetic_binary_uniform_add_halving_rounding Failure("bits_size_of_expr: no type known for If179__2")
Error: aarch64_vector_arithmetic_binary_uniform_add_halving_truncating Failure("bits_size_of_expr: no type known for If179__2")
Error: aarch64_vector_arithmetic_binary_uniform_add_saturating_simd Failure("bits_size_of_expr: no type known for If13__2")
Error: aarch64_vector_arithmetic_binary_uniform_add_saturating_sisd Failure("bits_size_of_expr: no type known for If13__2")
Error: aarch64_vector_arithmetic_binary_uniform_sub_int Failure("bits_size_of_expr: no type known for If179__2")
Error: aarch64_vector_arithmetic_binary_uniform_sub_saturating_simd Failure("bits_size_of_expr: no type known for If13__2")
Error: aarch64_vector_arithmetic_binary_uniform_sub_saturating_sisd Failure("bits_size_of_expr: no type known for If13__2")
Error: aarch64_vector_arithmetic_unary_add_saturating_simd Failure("bits_size_of_expr: no type known for If12__2")
Error: aarch64_vector_arithmetic_unary_add_saturating_sisd Failure("bits_size_of_expr: no type known for If12__2")
  Succeeded for 374 instructions

@katrinafyi katrinafyi force-pushed the offline-after-vec branch 2 times, most recently from 02e5ce3 to 8c3897d Compare July 19, 2024 07:31
@katrinafyi katrinafyi changed the title Offline after vec fix offline generation after vectoriser Jul 19, 2024
@katrinafyi katrinafyi marked this pull request as ready for review July 19, 2024 07:42
@katrinafyi katrinafyi changed the title fix offline generation after vectoriser fix offline generation after vectoriser and add ci Jul 22, 2024
also fixup extraction due to missed case in nested slice

we should now have all static-low-index extractions
@katrinafyi
Copy link
Member Author

katrinafyi commented Jul 22, 2024

I think this should fix it. It's rather awful, especially around the type-inference. I also expect performance regressions. This will need to be fixed up.

Edit: A litany of new failures... I think this has significantly worsened the output quality.

@ncough
Copy link
Collaborator

ncough commented Jul 23, 2024

It seems the old last minute slice removal pass was disabled (likely due to me messing around). Re-enabling gets rid of the dynamic bitvector slice, with some minor changes to the output quality. Changes in: https://github.com/UQ-PAC/aslp/tree/offline-after-vec-slice

Not sure how this compares with your change @katrinafyi , the last minute reduction to shift & trunc was always a bit hacky.

@ailrst ailrst merged commit eeb0ae8 into partial_eval Jul 24, 2024
3 checks passed
@katrinafyi katrinafyi deleted the offline-after-vec branch July 24, 2024 05:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants