moskewcz / boda

Boda: A C++ Framework for Efficient Experiments in Computer Vision
Other
63 stars 12 forks source link

Request for the boda-rtc generated code #3

Closed chaeseok closed 8 years ago

chaeseok commented 8 years ago

Hi, I'm going to check some optimization points of the boda-rtc generated OCL code for our SRP processor. I saw the Q4 report, and in section 3 there is an experimental graph with alexnet/googlenet/nin/firenet. Could you share the source code with us? Also, could you explain how the GF and the F/b data measured?

moskewcz commented 8 years ago

there seem to be a couple separate issues here; please open one issue per issue if you need more detailed answers.

1) in general, boda generates, compiles, and runs OpenCL and/or CUDA code at runtime. for debugging and analysis, the OpenCL and CUDA backends will emit the generated code on the side. while the generated code forms a library-like set of functions, like all OpenCL code, it's not meant for standalone use -- the code generated by boda is meant to be run by the boda-rtc backends, not other programs. so, like most generated code, it's not something that generally makes sense to distribute. in short, if you want boda's generated code, you need to run boda on the nets and input sizes of your choice. not sure what to run? see issue #2.

2) the per-net GF and F/b are calculated, not measured. for a given basic algorithm (i.e. direct convolution) they are properties of the net. the graph you're referencing is generated semi-automatically though the combination of several steps:

the details of the various calculations performed by flops.py are standard and outside the scope of boda. however, you're welcome to read the relevant sections of code, which should be fairly straightforward.