diff --git a/hpvm/projects/torch2hpvm/torch2hpvm/compile.py b/hpvm/projects/torch2hpvm/torch2hpvm/compile.py
index 172448a60d4f65fc4aafc09c9a76d9cb492ff7b0..d53776b363595dd10b8f46f792474b941f444f2b 100644
--- a/hpvm/projects/torch2hpvm/torch2hpvm/compile.py
+++ b/hpvm/projects/torch2hpvm/torch2hpvm/compile.py
@@ -173,6 +173,8 @@ class ModelExporter:
 
         args = [
             "hpvm-clang",
+            "-O3",
+            "-fno-exceptions",
             str(self.codefile),
             str(output_binary),
             *self.compile_args,