Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Add CUDA & OpenCL support#227

Open
crazyks wants to merge 190 commits into
google:masterfrom
ianhuang-777:opencl
Open

Add CUDA & OpenCL support#227
crazyks wants to merge 190 commits into
google:masterfrom
ianhuang-777:opencl

Conversation

@crazyks

@crazyks crazyks commented Jul 18, 2017

Copy link
Copy Markdown

Guetzli is an awesome jpeg encoder, however, it works a liitle bit slow. In order to speed it up, we have added CUDA & OpenCL support for Guetzli and we also optimized some procedure and added full jpeg format support.

This work is made by strongtu, ianhuang, tongzhan and me.

We had it tested on our GPU server, and here is the test statistical data for one of the sample pictures.
data

We hope that our codes can be merged into guetzli/master branch:)

strongtu added 30 commits June 2, 2017 17:29
cuDiffmapOpsinDynamicsImage
cuComputeBlockZeroingOrder
cuMask
继续简化代码
目前速度比opencl略差,待分析优化
cuEdgeDetectorMapEx
cuEdgeDetectorLowFreqEx
cuRemoveBorderEx
cuAddBorderEx
Conflicts:
	guetzli/butteraugli_comparator.cc
	third_party/butteraugli/butteraugli/butteraugli.h
Comment thread clguetzli/clguetzli.cl.h
#ifdef __cplusplus
#ifndef __CUDACC__
#include "CL/cl.h"
#include "cuda.h"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm having trouble building OpenCL only with the Intel SDK, this seems to be part of it.

size_t len, size_t offset,
const float* __restrict__ multipliers,
const float* __restrict__ inp,
double border_ratio,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

float here, otherwise linking error.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try OpenCL 2.0 or larger version in OpenCL Code Builder setting.

@crazyks crazyks closed this Jul 25, 2017
@crazyks crazyks reopened this Jul 25, 2017
@Bukashk0zzz

Copy link
Copy Markdown

Any news on this?

@robryk

robryk commented Jul 28, 2017

Copy link
Copy Markdown
Contributor

Thanks for this PR; it's quite large, not very trivial, and I don't speak Chinese, so it'll take me some more time to look through it.

@crazyks @pornel Please pay no attention to clabot complaints.

Comment thread README.md
```
You can pass a `--c` parameter to enable the procedure optimization or `--cuda` parameter to use the CUDA acceleration or `--opencl` to use the OpenCL acceleration.

If you have any question about CUDA/OpenCL support, please contact strongtu@tencent.com, ianhuang@tencent.com or chriskzhou@tencent.com.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe create a dropbox email like guetzli-support@tencent.com that would go to all 3 of you (and could be adjusted on your end to add/remove people as necessary without having to update these docs)

@FireEmerald

Copy link
Copy Markdown

Could someone of you provide a working binary file for windows with cuda support? This would be awesome.

@mikhailnov

Copy link
Copy Markdown

Will this require non-free CUDA (cuda.h) libraries for compilation? If yes, probably a compilation flag is needed to disable them...

@leafjungle

Copy link
Copy Markdown

where is cu_mem defined? cuda or opencl can not find that.

@ianhuang-777

Copy link
Copy Markdown

@leafjungle It's defined in clguetzli.cl.h, not an original CUDA definition.

@joyjoker2017

Copy link
Copy Markdown

which GPU was used in your environment?

@mikhailnov

Copy link
Copy Markdown

Waiting impatiently for this to be merged ))

@rogierlommers

Copy link
Copy Markdown

Yes, we all do!

@ianhuang-777

Copy link
Copy Markdown

@joyjoker2017 Tesla M40

@fvm

fvm commented Nov 4, 2017

Copy link
Copy Markdown

🙏 👍 Fingers crossed 🤞 😄

@fvm

fvm commented Dec 8, 2017

Copy link
Copy Markdown

Bump...

@DanielBiegler

Copy link
Copy Markdown

😴

@tina-junold

Copy link
Copy Markdown

Any news on this?

@alexblhr

Copy link
Copy Markdown

Is this ever going to be merged ? :)

@jonathas

Copy link
Copy Markdown

Any update on this? Please :)

@magicdoublem

Copy link
Copy Markdown

Did anyone ever succeed in building those binaries and want to share them? ;-)

@EwoutH

EwoutH commented Dec 12, 2019

Copy link
Copy Markdown

This looks incredible! @crazyks could you resolve the conflicts, update the dependencies and rebase? I will check with someone from Google if we can merge into master. If not, we can create a fork.

@doterax

doterax commented Jul 31, 2021

Copy link
Copy Markdown

Hi there. I have built Guetzli with CUDA for Windows.

You can download binaries from here.

@twitnic

twitnic commented Apr 25, 2023

Copy link
Copy Markdown

@crazyks could you resolve the conflict?

@doterax

doterax commented Apr 26, 2023

Copy link
Copy Markdown

@crazyks could you resolve the conflict?

I continue supporting guetzli with CUDA and OpenCl here, where you can also download windows binaries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.