-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse learn trace #42
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. I had three issues when running it (first three comments), though I may have been running it incorrectly... Related to that, how do I use this? I'm bumbling through using emu_test
, but I didn't specify the binary the first time and I'm not sure where the output logs are going.
This is documentation overhead, though, so just fix the first three things and I'll merge this. No need to rebase as this is all out-of-tree stuff.
@click.pass_context | ||
def tt(ctx, debug, rocket_chip_project_path): | ||
ctx.obj['DEBUG'] = debug | ||
rocket_chip_project_path = rocket_chip_project_path or os.environ.get( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was running this on my machine and I needed to import os
. Can you verify that this does work?
def emu_test(ctx, test_names, timeout=300): | ||
"""Run a baremetal emulation test.""" | ||
debug = ctx.obj['DEBUG'] | ||
rocket_chip_path = ctx.obj['ROCKET_CHIP_PATH'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ROCKET_CHIP_PROJECT_PATH
# click.echo(baseline_cache_file_path) | ||
# # Convert binary cache trace to ascii cache trace | ||
# _parse_learn_trace(ctx, baseline_cache_file_path, baseline_cache_file_name + '.cache.ascii') | ||
# click.echo() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
} | ||
return 0; | ||
fseek(file, 6, SEEK_SET); | ||
/*fread(&num_layers, sizeof(uint16_t), 1, file);*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
emulator_bin_path = path.join( | ||
rocket_chip_path, | ||
'emulator', | ||
'emulator-rocketchip-VelvetConfig') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The emulator name is not a known quantity and will be emulator-[package]-[config]
. I think it's safe to just specify the name of the emulator with an additional command line option.
parse_learn_trace
util for pretty-printing data from binary NN configtt
utility for running test nets with emulator and comparing to baseline FANN outputs