"scons/SConstruct" did not exist on "79b83505bcf73bf2903ebf2e2f82cb1e1f181816"
test_context.py 570 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

"""Tests for BenchmarkResult module."""

from superbench.benchmarks import BenchmarkContext, Platform, Framework


def test_benchmark_context():
    """Test BenchmarkContext class."""
    context = BenchmarkContext('pytorch-bert-large', Platform.CUDA, 'batch_size=8', framework=Framework.PYTORCH)
    assert (context.name == 'pytorch-bert-large')
    assert (context.platform == Platform.CUDA)
    assert (context.parameters == 'batch_size=8')
    assert (context.framework == Framework.PYTORCH)