22 lines
811 B
Python
22 lines
811 B
Python
#!/usr/bin/env python3
|
|
"""Tests for hardware_optimizer compatibility shim."""
|
|
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
|
|
|
from evolution import hardware_optimizer, quant_selector
|
|
|
|
|
|
def test_hardware_optimizer_reexports_quant_selector_api():
|
|
assert hardware_optimizer.select_quant_level is quant_selector.select_quant_level
|
|
assert hardware_optimizer.detect_hardware is quant_selector.detect_hardware
|
|
assert hardware_optimizer.HardwareInfo is quant_selector.HardwareInfo
|
|
assert hardware_optimizer.QuantSelection is quant_selector.QuantSelection
|
|
|
|
|
|
def test_hardware_optimizer_exports_quant_level_definitions():
|
|
assert hardware_optimizer.QUANT_LEVELS is quant_selector.QUANT_LEVELS
|
|
assert hardware_optimizer.QuantLevel is quant_selector.QuantLevel
|