Exemplo n.º 1
0
def main():
    """
    Main method.

    Create an experiment, gather the data, and plot the results.
    """
    invars = {
        "Olevel": [
            "-O0",
            "-O1",
            "-O2",
            "-O3",
            "-Os"
        ],
        "const": [True, False]
    }

    # Setup a persistent results store in the current directory.
    lab.setstore(".")

    # Create the experiment by enumerating the possible testcases from
    # the permutations of invars.
    harness = RtExperiment(testcase.cases(invars, type=RtOlevel))

    # Gather data using a static sample size of 100.
    results = harness.gather(sampler.Static(100))

    # Filter the results.
    baseline = results.select("const", False)
    const = results.select("const", True)

    # Plot the results.
    plot.bar("Olevel", "Runtime", baseline, path="basline.png")
    plot.bar("Olevel", "Runtime", const, path="const.png")
Exemplo n.º 2
0
def main():
    """
    Main method.

    Create an experiment and gather data.
    """

    invars = {
        "host": [
            "cec",
            "dhcp-90-060",
            "florence",
            "monza",
            "tim",
            "whz5"
        ],
        "device": [
            ("CPU", 1)
            ("GPU", 1)
            ("GPU", 2)
            ("GPU", 3)
            ("GPU", 4)
        ]
        "border": [
            [ 1,  1,  1,  1],
            [ 5,  5,  5,  5],
            [10, 10, 10, 10],
            [20, 20, 20, 20],
            [30, 30, 30, 30],
            [ 1, 10, 30, 30],
            [20, 10, 20, 10]
        ],
        "workgroup size c": [4, 16, 32, 64],
        "workgroup size r": [4, 16, 32, 64]
    }

    # Setup a persistent results store in the current directory.
    lab.setstore(".")

    # Create the experiment by enumerating the possible testcases from
    # the permutations of invars, subject to the constraints provided
    # by "invars_are_legal".
    sample_harness = E14(testcase.cases(invars, type=SimpleBigTest,
                                        contraints=invars_are_legal))

    # Gather data using a static sample size of 100.
    harness.gather(sampler.ProportionalVariance(0.05, min=5, max=30))