-
Notifications
You must be signed in to change notification settings - Fork 3
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
How do I condition CANVAS on runtime? #3
Comments
@5thGenDev Hi, very thankful to see you are trying this work and sorry for my late reply. For release consideration, I delete all my experiment code, but you can refer to this commit, which contains my experiment: https://github.com/tsinghua-ideal/Canvas/tree/30eb2d3bbe038c969bd8cff7580a7a672d705249. As shown in https://github.com/tsinghua-ideal/Canvas/blob/30eb2d3bbe038c969bd8cff7580a7a672d705249/experiments/search.py, after sampling a kernel by Canvas, we can count the FLOPs/params and filter the kernel. For runtime (model inference latency), the experiment in the paper uses a separate machine to TVMize kernels and evaluate the performance, this part is not fully automatic and not shown in the open-source code. |
Feel free to open/close this issue, if you need more code/help about the paper (e.g. TVM code generation and runtime evaluation), I am glad to provide :) |
I have an idea to replace conv 3x3 layer on pretrained U-Net diffusion. Im not sure how I can somehow hook .sample() class from Canvas to replace conv 3x3 in different encoders/decoders block |
You could follow the example in README. Or for an existing network, you can iterate all modules, match 3x3 convs, and replace them (e.g. use |
I referred to this line here in CANVAS paper: "Then Canvas evaluates the candidate kernels using two classes of user-specified constraints and optimization goals, including those that can be analytically modeled and calculated (e.g., numbers of operations and parameters), and those that need experimental measurements (e.g., runtime and accuracy)"
The text was updated successfully, but these errors were encountered: