Synesthesia / tests /test_tuning_framework.py
Ashiedu's picture
Sync unified workbench
0490201 verified
import unittest
import os
from ML_Pipeline.shared.env import apply_defaults
from ML_Pipeline.shared.tuning.config import RX6700XT_TUNING
class TestTuningIntegration(unittest.TestCase):
def test_env_defaults_apply_tuning(self):
# Clear relevant env vars to test fresh application
for key in RX6700XT_TUNING:
if key in os.environ:
del os.environ[key]
apply_defaults()
for key, expected_value in RX6700XT_TUNING.items():
self.assertEqual(os.environ.get(key), str(expected_value), f"{key} not correctly set in environment")
def test_tuning_config_content(self):
self.assertEqual(RX6700XT_TUNING["HSA_OVERRIDE_GFX_VERSION"], "10.3.0")
self.assertEqual(RX6700XT_TUNING["HSA_ENABLE_SDMA"], "0")
if __name__ == "__main__":
unittest.main()