Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Parse learn trace #42

wants to merge 3 commits into from

Conversation

matejaputic
Copy link

  • Automatically builds parse_learn_trace util for pretty-printing data from binary NN config
  • Introduces tt utility for running test nets with emulator and comparing to baseline FANN outputs

@matejaputic matejaputic requested a review from seldridge April 19, 2017 13:51
Copy link
Collaborator

@seldridge seldridge left a 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(
Copy link
Collaborator

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']
Copy link
Collaborator

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()
Copy link
Collaborator

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);*/
Copy link
Collaborator

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')
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants