opentuner icon indicating copy to clipboard operation
opentuner copied to clipboard

'Namespace' object has no attribute 'compile_template'

Open michaelii opened this issue 8 years ago • 3 comments

Hi I try to run the Opentuner.

But I got the issue and I have no idea how to fix it.

def make_command(self, cfg): return args.compile_template.format(source=args.source, output=args.output, flags=' '.join(self.cfg_to_flags(cfg)), cc=args.cc)

'And I go it Namespace' object has no attribute 'compile_template'

I check the code and whole opentuner. There are no another compile_template

Thanks

Michael

michaelii avatar Jul 07 '17 03:07 michaelii

It is part of the example code and not opentuner itself, line 30 of examples/gccflags/gccflags.py:

argparser.add_argument('--compile-template',
                       default='{cc} {source} -o {output} -lpthread {flags}',
                       help='command to compile {source} into {output} with'
                            ' {flags}')

This will cause argparser.parse_args() to populate args.compile_template.

jansel avatar Jul 07 '17 03:07 jansel

Thank you for your Help !!

Basically, we want to use this tool for research.

We try to run gccflags_minimal.py is easy for us. But gccflags.py.

Can you tell us. the sample command for gccflags.py? (e.g. for hello.py)

We do not know what the sample format.

Thanks

Michael

michaelii avatar Jul 13 '17 03:07 michaelii

./gccflags.py ./apps/matrixmultiply.cpp will autotune ./apps/matrixmultiply.cpp

./gccflags.py --help shows all the options

jansel avatar Jul 13 '17 04:07 jansel