jansel / opentuner

An extensible framework for program autotuning
http://opentuner.org/
MIT License
396 stars 115 forks source link

'Namespace' object has no attribute 'compile_template' #101

Open michaelii opened 7 years ago

michaelii commented 7 years ago

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

jansel commented 7 years ago

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.

michaelii commented 7 years ago

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

jansel commented 7 years ago

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

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