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

Bug in function get_total_cycles() #123

Open
thisisraghavkumar opened this issue Dec 11, 2024 · 0 comments
Open

Bug in function get_total_cycles() #123

thisisraghavkumar opened this issue Dec 11, 2024 · 0 comments

Comments

@thisisraghavkumar
Copy link

While calling the function scalesim.scale_sim.scalesim..get_total_cycles() I get the following error

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[3], line 9
      7 s.run_scale(top_path=logd[-1])
      8 m,n = s.config.get_array_dims()
----> 9 total_cycles = s.get_total_cycles()
     10 area_delay_product = m * n * total_cycles
     11 report_path = s.top_path + "/" + s.config.run_name

File ~/work/530/Project/ssim/lib/python3.12/site-packages/scalesim/scale_sim.py:155, in scalesim.get_total_cycles(self)
    152     print(message)
    153     return
--> 155 return self.runner.get_total_cycles()

File ~/work/530/Project/ssim/lib/python3.12/site-packages/scalesim/simulator.py:165, in simulator.get_total_cycles(self)
    163 total_cycles = 0
    164 for layer_obj in self.single_layer_sim_object_list:
--> 165     cycles_this_layer = int(layer_obj.get_compute_report_items[0])
    166     total_cycles += cycles_this_layer
    168 return total_cycles

TypeError: 'method' object is not subscriptable

This can be easily fixed by adding parentheses () after the function name on line 165 in file simulator.py

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

No branches or pull requests

1 participant