a gpu-based architecture for parallel image-aware version ...leomurta/courses/cm/csmr2012.pdf ·...
TRANSCRIPT
A GPU-based Architecture for Parallel Image-aware Version Control
Jose Ricardo da Silva Junior Toni PachecoEsteban Clua Leonardo Murta
Instituto de Computação
Universidade Federal Fluminense
A GPU-based Architecture for Parallel Image-aware Version Control
IntroductionGPU processingVCS operationsResultsConclusionFuture works
Schedule
2
A GPU-based Architecture for Parallel Image-aware Version Control
Version control, nowadays, is considered a vitalcomponent for supporting professionalsoftware development.
Mainly based on files and directories.
Textual artifacts has a well established process.
Unfortunately, VCS for binary data are not yet well established.
Introduction
3
A GPU-based Architecture for Parallel Image-aware Version Control
Movie industry
Game Industry
Advertising Industry
Introduction
Normally, has more binary artifacts (sound, 3d models, images) than textual artifacts
So many projects are highly binary data intensive!
A GPU-based Architecture for Parallel Image-aware Version Control
Normally, to deal with binary data, two paths are used:
Store the binary data as a whole between each modification.• Loose semantic information!• Requires more storage space.• No processing time.
Implement algorithms to deal with these binary artifacts.• Allows more semantic for the end user.• Requires more processing and time!
Introduction
5
A GPU-based Architecture for Parallel Image-aware Version Control
What has been changed between these two revisions?
Storing binary data as a whole
6
Revision 1 Revision 2
A GPU-based Architecture for Parallel Image-aware Version Control
Normally, state-based VCS, such as Git, saves binarydata without any delta information.
High network traffic in projects that uses a lot of binary artifacts!Slow down operations of check –in and –out!More disk space required.Loose of productivity!
Storing binary data as a whole
7
Check-out
A GPU-based Architecture for Parallel Image-aware Version Control
Store delta information between binary artifacts.Less disk space required.Allows more semantic to be presented to user.On the other hand, normally requires a lot moreprocessing during check-in and –out operations!
Semantic based algorithms
8
Check-out
A GPU-based Architecture for Parallel Image-aware Version Control
Semantic based algorithms
9
In order to process two single images for diff operation, as example:
Processing of 2.097.152 elements!
Revision 1 Revision 2
Hei
ght:
102
4
Hei
ght:
102
4
Width: 1024Width: 1024
1.048.576 pixels 1.048.576 pixels
A GPU-based Architecture for Parallel Image-aware Version Control
Semantic based algorithms
10
Normally, images are composed pixels of three (RGB) or four (RGBA) channels, for Red, Green, Blue and Alpha, requiring processing each channel, individually during VCS operation.
A GPU-based Architecture for Parallel Image-aware Version Control
Due to these observations, we are aimed to:Give semantic information for image type artifacts;Process as fast as possible diff, patch and merge operations during check-in and –out;Use less space to store delta between revisions.Using GPU due to problem characteristics (data independency).
Motivation
11
DIF
F
MER
GE
PATC
H
A GPU-based Architecture for Parallel Image-aware Version Control
Aimed to locate differences between imagesand save its delta.
Uses the XOR operation on each channel to find its delta.
Diff on IMUFF
12
C.At(x,y).R = A.At(x,y).R XOR B.At(x,y).R;C.At(x,y).G = A.At(x,y).G XOR B.At(x,y).G;C.At(x,y).B = A.At(x,y).B XOR B.At(x,y).B;
A B C
Diff =
Parallel
A GPU-based Architecture for Parallel Image-aware Version Control
As can be observed, most of our delta image is composed of black colors (zeros).
After compression, this delta leads to small size, requiring less storageand network bandwidth.
Usually, small deltas are expected between two consecutives versions.
Gives the user a high semantic information of the modification.
Diff on IMUFF
13
A GPU-based Architecture for Parallel Image-aware Version Control
Aimed to reconstruct others revisions.Like diff, uses the XOR operation on each channel to reconstruct a revision.
Patch on IMUFF
14
B.At(x,y).R = A.At(x,y).R XOR C.At(x,y).R;B.At(x,y).G = A.At(x,y).G XOR C.At(x,y).G;B.At(x,y).B = A.At(x,y).B XOR C.At(x,y).B;
A C B
Patch =
Parallel
A GPU-based Architecture for Parallel Image-aware Version Control
Some properties of XOR operation in IMUFF:patch(A,C) = A if C is an empty delta
patch (A,C) = patch(C,A) = Bpatch (A,C) = B and patch(B,C) = A
Patch on IMUFF
15
B.At(x,y).R = A.At(x,y).R XOR C.At(x,y).R;B.At(x,y).G = A.At(x,y).G XOR C.At(x,y).G;B.At(x,y).B = A.At(x,y).B XOR C.At(x,y).B;
B C A
Patch =
Parallel
A GPU-based Architecture for Parallel Image-aware Version Control
Performed to conciliate two revisions created in parallel.Uses the previously diff and patch operations.
Merge on IMUFF
16
A"
B" D"
Changes
A"
B" D"Changes
Diff
C"
A"
B" D"Changes
Patch
C"
E"
1 2
A GPU-based Architecture for Parallel Image-aware Version Control
Performed to conciliates two revisions created in parallel.
Merge on IMUFF
17
In case the same image area are changed, a conflict in generated, like a common line based VCS.
A
B
C=Diff(A,B)
D
E=Patch(D,C)
A GPU-based Architecture for Parallel Image-aware Version Control
In order to perform these operations on IMUFF, a GUI is freely available at http://josericardojunior.com/imuff/.
Results
18
A GPU-based Architecture for Parallel Image-aware Version Control
Processing time:
Results
19
1"
10"
100"
1000"
10000"
512x512" 1024x1024" 2048x2048" 4096x4096"
Time%(m
s)%
Image%Size%
Image%Processing%Time%
CPU"Diff"
GPU"Diff"
CPU"Patch"
GPU"Patch"
CPU"Merge"
GPU"Merge"
*Using log10 scale.
A GPU-based Architecture for Parallel Image-aware Version Control
Comparison between storage for the whole binary data and our delta.
Results
20
0,44802&
3&5,841752&
11,777958&
0,006655&
0,024877&0,085436&
0,151375&
0,000001&
0,00001&
0,0001&
0,001&
0,01&
0,1&
1&
10&
100&
512x512& 1024x1024& 2048x2048& 4096x4096&
Size%(M
Bytes)%
Image%Size%
Storage%Space%
Original&
Delta&
*Using the “Where is Waldo” sample.*Using log10 scale.
A GPU-based Architecture for Parallel Image-aware Version Control
Aligned images.Reasonable for VCS as its track evolutions.
All evolutions must maintain the same image’s resolution.
Only work for PNG images.
Restrictions
21
A GPU-based Architecture for Parallel Image-aware Version Control
IMUFF is not a VCS as it.Instead, provides infrastructure to allow any VCS to better work with images artifact.
We are planning to develop a plugin for Git and Subversion to deal with image artifacts.
Study how to work with movie artifacts.
Future Works
22
A GPU-based Architecture for Parallel Image-aware Version Control
Using GPU for VCS processing can speedup up to 55x CPU processing.
Working with delta for image artifacts can reduce greatly the space required to store it.
Using IMUFF gives the user sematic over its image artifacts.
Allow faster check-in and –out of image artifacts, also reducing network bandwidth for distributed VCS systems.
Conclusion
23
A GPU-based Architecture for Parallel Image-aware Version Control
Jose Ricardo da Silva Junior Toni PachecoEsteban Clua Leonardo Murta
Instituto de Computação
Universidade Federal Fluminense
A GPU-based Architecture for Parallel Image-aware Version Control
GPU (Graphics Processor Unit) is a massivelymulti-threaded processor capable of performalmost thousands of operations/second.
Using GPU for VCS operations
25
Presented in almost every personal computer!
A GPU-based Architecture for Parallel Image-aware Version Control
Allows for heterogeneous environment.Both GPU and CPU doing different tasks at the same time.
Using GPU for VCS operations
26
instruction
instruction
GPUCPU
IdleBusy