From 162330f25aeec09694fffaaa31ba9b318620eb9c Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Wed, 29 Apr 2020 21:28:15 +0200 Subject: build: rework x86 CPU variants Type: improvement Change-Id: Ief243f88e654e578ef9b8060fcf535b364aececb Signed-off-by: Damjan Marion --- test/test_node_variants.py | 55 +++++++++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 15 deletions(-) (limited to 'test') diff --git a/test/test_node_variants.py b/test/test_node_variants.py index 8298dc863a4..3632910e3cb 100644 --- a/test/test_node_variants.py +++ b/test/test_node_variants.py @@ -67,48 +67,73 @@ class TestNodeVariant(VppTestCase): self.assertEqual(variant_info[0], variant) -class TestAVX512Variant(TestNodeVariant): - """ Test avx512 Node Variants """ +class TestICLVariant(TestNodeVariant): + """ Test icl Node Variants """ - VARIANT = "avx512" - LINUX_VARIANT = VARIANT + "f" + VARIANT = "icl" + LINUX_VARIANT = "avx512_bitalg" @classmethod def setUpConstants(cls): - super(TestAVX512Variant, cls).setUpConstants(cls.VARIANT) + super(TestICLVariant, cls).setUpConstants(cls.VARIANT) @classmethod def setUpClass(cls): - super(TestAVX512Variant, cls).setUpClass() + super(TestICLVariant, cls).setUpClass() @classmethod def tearDownClass(cls): - super(TestAVX512Variant, cls).tearDownClass() + super(TestICLVariant, cls).tearDownClass() @unittest.skipUnless(skipVariant(LINUX_VARIANT), VARIANT + " not a supported variant, skip.") - def test_avx512(self): + def test_icl(self): self.checkVariant(self.VARIANT) -class TestAVX2Variant(TestNodeVariant): +class TestSKXVariant(TestNodeVariant): + """ Test skx Node Variants """ + + VARIANT = "skx" + LINUX_VARIANT = "avx512f" + + @classmethod + def setUpConstants(cls): + super(TestSKXVariant, cls).setUpConstants(cls.VARIANT) + + @classmethod + def setUpClass(cls): + super(TestSKXVariant, cls).setUpClass() + + @classmethod + def tearDownClass(cls): + super(TestSKXVariant, cls).tearDownClass() + + @unittest.skipUnless(skipVariant(LINUX_VARIANT), + VARIANT + " not a supported variant, skip.") + def test_skx(self): + self.checkVariant(self.VARIANT) + + +class TestHSWVariant(TestNodeVariant): """ Test avx2 Node Variants """ - VARIANT = "avx2" + VARIANT = "hsw" + LINUX_VARIANT = "avx2" @classmethod def setUpConstants(cls): - super(TestAVX2Variant, cls).setUpConstants(cls.VARIANT) + super(TestHSWVariant, cls).setUpConstants(cls.VARIANT) @classmethod def setUpClass(cls): - super(TestAVX2Variant, cls).setUpClass() + super(TestHSWVariant, cls).setUpClass() @classmethod def tearDownClass(cls): - super(TestAVX2Variant, cls).tearDownClass() + super(TestHSWVariant, cls).tearDownClass() - @unittest.skipUnless(skipVariant(VARIANT), + @unittest.skipUnless(skipVariant(LINUX_VARIANT), VARIANT + " not a supported variant, skip.") - def test_avx2(self): + def test_hsw(self): self.checkVariant(self.VARIANT) -- cgit 1.2.3-korg