stonne-simulator / stonne

STONNE: A Simulation Tool for Neural Networks Engines
MIT License
120 stars 30 forks source link

Questions about list of simulated functions #29

Closed js4ngu closed 8 months ago

js4ngu commented 1 year ago

Thank you for always answering my questions kindly.

I recently use the stonne simulator again.

In my case, "torch.add/torch.sub / torch.Basic matrix arithmetic functions such as "matmul" are used a lot.

"Matmul" confirmed that there was a function simulated by the STONNE engine.

However, there seems to be no add/sub. I wonder if I understand well.

In addition, I wonder where I can find the list of functions simulated in STONNE engine.

Thank you for releasing useful software.

I hope you are always happy.

Adrian-2105 commented 1 year ago

Hi,

Unfortunately, STONNE does not implement any function to simulate ADD or SUB operations since they are not the target of DNN accelerators such as MAERI. They only focus on GEMM operations, which have a higher complexity order. ADD and SUB operations can be performed fast even in a CPU since it does not require data reuse or similar difficulties.

About the functions supported by STONNE in PyTorch, there are 2:

The syntax of these methods uses the same parameters as their original PyTorch equivalents but adds the configuration file, the tile specification, the sparsity ratio and (only for SimulatedConv2) the number of groups

We will add this information to the STONNE documentation in the future.

js4ngu commented 1 year ago

THX!!!

js4ngu commented 1 year ago

torch.nn.SimulatedLinear Looks like using Fully connect tiling method Is it correct?

Adrian-2105 commented 1 year ago

Hi,

I don't understand what you mean exactly. torch.nn.SimulatedLinear receives a filename as parameter which contains the tile to be used when computing the GEMM. Take a look to the example available at the repository. Thus, yes, it applies tiling