mirror of
https://github.com/RRZE-HPC/OSACA.git
synced 2026-01-07 03:30:06 +01:00
autodetect ISA and default uarch for ISA
This commit is contained in:
@@ -18,6 +18,12 @@ class TestBaseParser(unittest.TestCase):
|
||||
pass
|
||||
with open(self._find_file('triad_x86_iaca.s')) as f:
|
||||
self.triad_code = f.read()
|
||||
with open(self._find_file('triad_arm_iaca.s')) as f:
|
||||
self.triad_code_arm = f.read()
|
||||
with open(self._find_file('kernel_x86.s')) as f:
|
||||
self.x86_code = f.read()
|
||||
with open(self._find_file('kernel_aarch64.s')) as f:
|
||||
self.aarch64_code = f.read()
|
||||
|
||||
##################
|
||||
# Test
|
||||
@@ -59,6 +65,12 @@ class TestBaseParser(unittest.TestCase):
|
||||
with self.assertRaises(NotImplementedError):
|
||||
self.parser.normalize_imd(imd_hex_1)
|
||||
|
||||
def test_detect_ISA(self):
|
||||
self.assertEqual(BaseParser.detect_ISA(self.triad_code), 'x86')
|
||||
self.assertEqual(BaseParser.detect_ISA(self.triad_code_arm), 'aarch64')
|
||||
self.assertEqual(BaseParser.detect_ISA(self.x86_code), 'x86')
|
||||
self.assertEqual(BaseParser.detect_ISA(self.aarch64_code), 'aarch64')
|
||||
|
||||
##################
|
||||
# Helper functions
|
||||
##################
|
||||
|
||||
Reference in New Issue
Block a user