default skip all exception in beam (#4822)

added a flag `BEAM_STRICT_MODE` to catch compile error or other exceptions on demand
This commit is contained in:
chenyu
2024-06-03 18:21:36 -04:00
committed by GitHub
parent 3afc914617
commit 1e02b4cae1

View File

@@ -70,6 +70,9 @@ def _try_compile_linearized_w_idx(x:Tuple[int,Linearizer], compiler:Compiler) ->
ret = None
except TimeoutException:
ret = None
except Exception as e:
if getenv("BEAM_STRICT_MODE"): raise e
ret = None
finally:
signal.alarm(0)
return x[0], ret