pash
pash copied to clipboard
feat: --assert_all_regions_parallelizable flag that has the same func…
To introduce the --assert_all_regions_parallelizable flag (should exit with error when both UnparallelizableError and general exception are caught) and changing the original --assert_compiler_success flag to exiting with error only when general exceptions are caught (does not exit with error when UnparallelizableError are caught), the following were added:
-
compiler/orchestrator_runtime/pash_init_setup.sh,compiler/cli.py: set-up and add information regarding--assert_all_regions_parallelizableflag for pash to recognize -
compiler/custom_error.py: introduceNotAllRegionParallelizableErrorto be raised whenUnparallelizableErrorare caught in thecompile.irfunction inpash/compiler/pash_compiler.py;- the
NotAllRegionParallelizableErrorwill be caught incompiler/pash_compilation_server.pywhen thecompile.irfunction is called; if this error is caught, the new variableall_region_parallelizableincompiler/pash_compilation_server.pywill be marked false - to differentiate all regions not parallelizable from general error, a
error_responsewith a different error message is saved in the compiler server - don't increase the running procs if
assert_compiler_successflag is on andcompile_successis false butall_region_parallelizableis true (some general exceptions caught) ; orassert_all_regions_parallelizableflag on andcompile_successis false because of both general exceptions or unparallelizable region
- the
-
compiler/orchestrator_runtime/pash_prepare_call_compiler.sh: marks variablepash_all_region_parallelizableiferror_responsecontains message regarding regions not being parallelizable. We should exit on error when,assert_all_regions_parallelizableflag on andruntime_return_code != 0: general exceptionassert_all_regions_parallelizableflag on andpash_all_region_parallelizable != 0: some region is not parallelizableassert_compiler_success_flagflag on andruntime_return_code != 0andpash_all_region_parallelizable == 0: general exception (and not error because some regions were not parallelizable)
-
evaluation/tests/test_evaluation_scripts.sh: when executing tests, change--assert_compiler_successto--assert_all_regions_parallelizable, since what assert_compiler_success originally does is now carried out by--assert_all_regions_parallelizable
Tested the above for expected behavior by running some intro scripts in the directory, and it does seem like we are exiting with error for --assert_compiler_success only when general exceptions are caught and not the unparallelizable ones. We are also exiting on error for both reasons when --assert_all_regions_parallelizable flag is on. When both flags are used at the same time, we follow the behavior of --assert_all_regions_parallelizable. PaSh testing scripts locally also seems to pass all tests.
OS:ubuntu-20.04 Sun Jun 16 21:02:20 UTC 2024 intro: 2/2 tests passed. interface: 41/41 tests passed. compiler: 54/54 tests passed.
OS = CPU = Ram = Hash = 349efe6d Kernel=
LGTM :-)
OS = CPU = Ram = Hash = 9e67a362 Kernel=
OS:ubuntu-20.04 Fri Jul 12 20:03:49 UTC 2024 intro: 2/2 tests passed. interface: 41/41 tests passed. compiler: 54/54 tests passed.
OS = CPU = Ram = Hash = 536bd8e5 Kernel=
OS:ubuntu-20.04 Fri Jul 12 20:06:57 UTC 2024 intro: 2/2 tests passed. interface: 41/41 tests passed. compiler: 54/54 tests passed.
Thank you for this fix!!