コード例 #1
0
 def testCompileMultipleBackends(self):
     binary = compiler.compile_str(
         SIMPLE_MUL_ASM, target_backends=["dylib-llvm-aot", "vulkan-spirv"])
     logging.info("Flatbuffer size = %d", len(binary))
     self.assertTrue(binary)
コード例 #2
0
 def testCompileStrLLVMAOT(self):
     binary = compiler.compile_str(SIMPLE_MUL_ASM,
                                   target_backends=["dylib-llvm-aot"])
     logging.info("Flatbuffer size = %d", len(binary))
     self.assertTrue(binary)
コード例 #3
0
 def testNoTargetBackends(self):
     with self.assertRaisesRegex(
             ValueError, "Expected a non-empty list for 'target_backends'"):
         binary = compiler.compile_str(SIMPLE_MUL_ASM)
コード例 #4
0
 def testCompileStr(self):
     binary = compiler.compile_str(
         SIMPLE_MUL_ASM, target_backends=compiler.DEFAULT_TESTING_BACKENDS)
     logging.info("Flatbuffer size = %d", len(binary))
     self.assertTrue(binary)
コード例 #5
0
 def testException(self):
     with self.assertRaisesRegex(compiler.CompilerToolError,
                                 "Invoked with"):
         _ = compiler.compile_str(
             "I'm a little teapot but not a valid program",
             target_backends=compiler.DEFAULT_TESTING_BACKENDS)