Accelergy-Project / timeloop-accelergy-exercises

Exercises for exploring the Fibertree, Timeloop and Accelergy tools
MIT License
85 stars 29 forks source link

No mapping for Eyeriss #46

Closed Jvafaei closed 5 months ago

Jvafaei commented 6 months ago

I am trying to find a mapping for Eyeriss, but when I use the 'linear-pruned' algorithm, no valid mapping is found. What could be the issue? I have only changed the algorithm to "linear-pruned" in the mapper file.

angshuman-parashar commented 6 months ago

Could you help us reproduce this by attaching the exact YAMLs you used?

tanner-andrulis commented 6 months ago

As a followup, linear_pruned fails with the default Eyeriss like and default problem.yaml because it times out. You can increase the timeout (I did by a factor of 100x) and it works just fine.

When you change the algorithm to linear_pruned, Timeloop will search linearly across mappings in the mapspace (rather than randomly picking mappings). linear_pruned is more prone to timeouts than random because Timeloop may pick an invalid mapping and linearly explore mappings around that invalid mapping, which themselves are also likely to be invalid.

We use a particularly low timeout in the default mapper.yaml so that the examples will be quick to run. This leads to the timeout with linear_pruned. Generally, this should not be an issue because if you're trying to find mappings for real architecture explorations (not small examples), you should be using a much larger timeout.

Jvafaei commented 6 months ago

Thanks. mapper file has been attached. mapper.zip

Jvafaei commented 6 months ago

As a followup, linear_pruned fails with the default Eyeriss like and default problem.yaml because it times out. You can increase the timeout (I did by a factor of 100x) and it works just fine.

When you change the algorithm to linear_pruned, Timeloop will search linearly across mappings in the mapspace (rather than randomly picking mappings). linear_pruned is more prone to timeouts than random because Timeloop may pick an invalid mapping and linearly explore mappings around that invalid mapping, which themselves are also likely to be invalid.

We use a particularly low timeout in the default mapper.yaml so that the examples will be quick to run. This leads to the timeout with linear_pruned. Generally, this should not be an issue because if you're trying to find mappings for real architecture explorations (not small examples), you should be using a much larger timeout.

Thanks for your response, Tanner. Unfortunately, it does not solve the issue; no valid mapping was found.

tanner-andrulis commented 6 months ago

That mapper file works OK for me (with python3 run_example_designs.py --architecture eyeriss_like). What other YAMLs are you using?

Jvafaei commented 6 months ago

I used the YAML files from this path: workspace/tutorial_exercises/01_accelergy_timeloop_2020_ispass/timeloop/06-mapper-convlayer-eyeriss

tanner-andrulis commented 6 months ago

You're trying to map a large VGG layer and there is a very large mapspace to search (look at the mapspace dimension in your Timeloop output).

My previous explanation holds; linear_pruned is searching subspapces of this very large mapspace, and it'll take a long time to find a valid mapping this way.

I'd recommend just using random, random_pruned, or hybrid. These will search randomly-chosen points in the large mapspace (rather than trying to exhaustively explore the whole space), and will converge much more quickly.

Jvafaei commented 6 months ago

Thanks for your explanation. By the way, linear pruned is almost not working even with a very large timeout and other limits. The issue is solved by using random.

I have another question. I am trying to reproduce some results from the Timeloop paper based on Eyeriss, for example, Fig. 12(b). However, the results are not consistent. I wonder what mapper parameters I should use to get the exact results.

tanner-andrulis commented 5 months ago

As this is a question on the Timeloop paper, it should be asked in the main Timeloop repository.