Skip to content
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

Add CUDA & OpenCL support #227

Open
wants to merge 190 commits into
base: master
Choose a base branch
from
Open

Add CUDA & OpenCL support #227

wants to merge 190 commits into from

Conversation

crazyks
Copy link

@crazyks crazyks commented Jul 18, 2017

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
#ifdef __cplusplus
#ifndef __CUDACC__
#include "CL/cl.h"
#include "cuda.h"
Copy link

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

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.

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

Any news on this?

@robryk
Copy link
Contributor

robryk commented Jul 28, 2017

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.

```
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

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

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

@mikhailnov
Copy link

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

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

@ianhuang-777
Copy link

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

@joyjoker2017
Copy link

which GPU was used in your environment?

@mikhailnov
Copy link

Waiting impatiently for this to be merged ))

@rogierlommers
Copy link

Yes, we all do!

@ianhuang-777
Copy link

@joyjoker2017 Tesla M40

@fvm
Copy link

fvm commented Nov 4, 2017

🙏 👍 Fingers crossed 🤞 😄

@fvm
Copy link

fvm commented Dec 8, 2017

Bump...

@DanielBiegler
Copy link

😴

@tina-junold
Copy link

Any news on this?

@alexblhr
Copy link

Is this ever going to be merged ? :)

@jonathas
Copy link

Any update on this? Please :)

@magicdoublem
Copy link

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

@EwoutH
Copy link

EwoutH commented Dec 12, 2019

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
Copy link

doterax commented Jul 31, 2021

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

You can download binaries from here.

@twitnic
Copy link

twitnic commented Apr 25, 2023

@crazyks could you resolve the conflict?

@doterax
Copy link

doterax commented Apr 26, 2023

@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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.