Fix remaining ruff lint errors

This commit is contained in:
Jordan Carlin 2025-01-27 01:25:13 -08:00
parent 3acc43711f
commit 1d71889709
No known key found for this signature in database
3 changed files with 8 additions and 9 deletions

View File

@ -10,7 +10,7 @@ from plotly.subplots import make_subplots
debug = True debug = True
def loadCoremark(): def loadCoremark(coremarkData):
"""loads the coremark data dictionary""" """loads the coremark data dictionary"""
coremarkPath = "riscv-coremark/work/coremark.sim.log" coremarkPath = "riscv-coremark/work/coremark.sim.log"
@ -93,7 +93,7 @@ def main():
embenchSpeedOpt_SpeedData = {} embenchSpeedOpt_SpeedData = {}
embenchSizeOpt_SizeData = {} embenchSizeOpt_SizeData = {}
embenchSpeedOpt_SizeData = {} embenchSpeedOpt_SizeData = {}
# coremarkData = loadCoremark() coremarkData = loadCoremark(coremarkData)
embenchSpeedOpt_SpeedData = loadEmbench("embench/wallySpeedOpt_speed.json", embenchSpeedOpt_SpeedData) embenchSpeedOpt_SpeedData = loadEmbench("embench/wallySpeedOpt_speed.json", embenchSpeedOpt_SpeedData)
embenchSizeOpt_SpeedData = loadEmbench("embench/wallySizeOpt_speed.json", embenchSizeOpt_SpeedData) embenchSizeOpt_SpeedData = loadEmbench("embench/wallySizeOpt_speed.json", embenchSizeOpt_SpeedData)
embenchSpeedOpt_SizeData = loadEmbench("embench/wallySpeedOpt_size.json", embenchSpeedOpt_SizeData) embenchSpeedOpt_SizeData = loadEmbench("embench/wallySpeedOpt_size.json", embenchSpeedOpt_SizeData)

View File

@ -275,7 +275,7 @@ def BarGraph(seriesDict, xlabelList, BenchPerRow, FileName, IncludeLegend):
# the space between groups is 1 # the space between groups is 1
EffectiveNumInGroup = NumberInGroup + 2 EffectiveNumInGroup = NumberInGroup + 2
barWidth = 1 / EffectiveNumInGroup barWidth = 1 / EffectiveNumInGroup
fig = plt.subplots(figsize = (EffectiveNumInGroup*BenchPerRow/8, 4)) _ = plt.subplots(figsize = (EffectiveNumInGroup*BenchPerRow/8, 4))
colors = ['blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'black', 'black', 'black', 'black', 'black', 'black'] colors = ['blue', 'blue', 'blue', 'blue', 'blue', 'blue', 'black', 'black', 'black', 'black', 'black', 'black']
for name in seriesDict: for name in seriesDict:
values = seriesDict[name] values = seriesDict[name]
@ -322,7 +322,6 @@ def ReportAsGraph(benchmarkDict, bar, FileName):
if(args.summary): if(args.summary):
markers = ['x', '.', '+', '*', '^', 'o', ',', 's'] markers = ['x', '.', '+', '*', '^', 'o', ',', 's']
colors = ['blue', 'black', 'gray', 'dodgerblue', 'lightsteelblue', 'turquoise', 'black', 'blue'] colors = ['blue', 'black', 'gray', 'dodgerblue', 'lightsteelblue', 'turquoise', 'black', 'blue']
temp = benchmarkDict['Mean']
# the benchmarkDict['Mean'] contains sequencies of results for multiple # the benchmarkDict['Mean'] contains sequencies of results for multiple
# branch predictors with various parameterizations # branch predictors with various parameterizations
@ -378,10 +377,10 @@ def ReportAsGraph(benchmarkDict, bar, FileName):
if(not args.summary): if(not args.summary):
NumBenchmarks = len(benchmarkDict) NumBenchmarks = len(benchmarkDict)
NumBenchmarksSqrt = math.sqrt(NumBenchmarks) # NumBenchmarksSqrt = math.sqrt(NumBenchmarks)
isSquare = math.isclose(NumBenchmarksSqrt, round(NumBenchmarksSqrt)) # isSquare = math.isclose(NumBenchmarksSqrt, round(NumBenchmarksSqrt))
numCol = math.floor(NumBenchmarksSqrt) # numCol = math.floor(NumBenchmarksSqrt)
numRow = numCol + (0 if isSquare else 1) # numRow = numCol + (0 if isSquare else 1)
index = 1 index = 1
BenchPerRow = 5 BenchPerRow = 5

View File

@ -19,7 +19,7 @@ def deleteRedundant(synthsToRun):
synthStr = "rm -rf runs/{}_{}_rv32e_{}_{}_*" synthStr = "rm -rf runs/{}_{}_rv32e_{}_{}_*"
for synth in synthsToRun: for synth in synthsToRun:
bashCommand = synthStr.format(*synth) bashCommand = synthStr.format(*synth)
outputCPL = subprocess.check_output(['bash','-c', bashCommand]) subprocess.check_output(['bash','-c', bashCommand])
def freqSweep(module, width, tech): def freqSweep(module, width, tech):
synthsToRun = [] synthsToRun = []