Something went wrong while setting issue due date.
Get Assembly output of kernel
I think it would be helpful sometimes to have something like ps.show_assembly
which directly prints the Assembly Code of a kernel.
I think it would be helpful sometimes to have something like ps.show_assembly
which directly prints the Assembly Code of a kernel.
Link issues together to show that they're related. Learn more.
added feature label
The assembly output can be shown via the in-core model output
from kerncraft.
A small example would be this:
from pystencils.session import *
import kerncraft
from pystencils.kerncraft_coupling import KerncraftParameters, PyStencilsKerncraftKernel
src, dst = ps.fields('src(1), dst(1) : double[128, 128]')
update_rule = ps.Assignment(dst[0, 0], src[-1, 0] + src[0, 0])
ast = ps.create_kernel(update_rule)
machine_file_path = "../Skylake_E3-1240.yml"
machine = kerncraft.machinemodel.MachineModel(path_to_yaml=machine_file_path)
k = PyStencilsKerncraftKernel(ast, machine)
model = kerncraft.models.ECM(k, machine, KerncraftParameters())
model.analyze()
print(model.results['in-core model output'])
It will print a nice output of the assembly showing only the relevant loop nest
closed