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

Abstract InstructionForm #23

Open
cod3monk opened this issue Jan 10, 2019 · 2 comments
Open

Abstract InstructionForm #23

cod3monk opened this issue Jan 10, 2019 · 2 comments
Assignees

Comments

@cod3monk
Copy link
Member

cod3monk commented Jan 10, 2019

Have a class representation of an InstructionForm, which can be created from an assembly line or by describing a mnemonic and its parameters.

This class should be able to generate a canonical string representation and handle (or at least reference) performance relevant information.

@JanLJL
Copy link
Collaborator

JanLJL commented Mar 17, 2020

After applying the semantics with add_semantics (and if wished the optimal throughput with assign_optimal_throughput) to the kernel, each element of the kernel list inherits the following attributes as dict:

>>> kernel[0].keys()
dict_keys(['instruction', 'operands', 'directive', 'comment', 'label', 'line', 
'line_number', 'semantic_operands', 'port_pressure', 'port_uops', 'flags', 
'throughput', 'latency', 'latency_wo_load', 'latency_cp', 'latency_lcd'])

This object includes a canonical number (line_number), the original string representation (line) and performance relevant information (basically all other attributes).
Is that sufficient for you?

@cod3monk
Copy link
Member Author

It's rather tedious to work with, some OO programming could be helpful here. E.g., a class InstructionForm, which captures the parsed information found in an assembly code line. Then this object can be passed a machine model, which allows it to relate it self to a mnemonic and offers performance relevant information. And so on.

Not urgent and requires some rewriting, but makes it easier to work with from a programmers point of view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
OSACA Kanban
  
To do
Development

No branches or pull requests

3 participants