Skip to contentSkip to conversation

QEmu TCG SIMD extension?

Qemu-devel 陳韋任 (Wei-Ren Chen) 3 participants 5 messages Mar 6, 2013

lore
Share & tools
lore
#0 lore raw

Hi all,

While searching for QEMU SIMD issues, I found there was a paper presented in 2011 [1], and the source code is also public on [2]. However, it seems this project doesn't make any progress since last year. I update their change to upstream and you can download from here:

  $ git clone git://github.com/azru0512/qemu.git -b neon-simd

Sadly, it can not boot the kernel image provided on [2]. Anyway, I found there was only one thread has discussion on their work [3]. I want to hear more feedback on their idea on adding SIMD TCG IR.

[1] http://adt.cs.upb.de/quf/quf11/quf2011_12.pdf
[2] http://tima-sls.imag.fr/www/research/qemu/simd-qemu/
[3] http://lists.gnu.org/archive/html/qemu-devel/2011-03/msg02065.html

Regards,
chenwj

Signature · 5 lines
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
#1 lore raw
Quoted 10 lines · 陳韋任 (Wei-Ren Chen)

While searching for QEMU SIMD issues, I found there was a paper presented in 2011 [1], and the source code is also public on [2]. However, it seems this project doesn't make any progress since last year. I update their change to upstream and you can download from here:

  $ git clone git://github.com/azru0512/qemu.git -b neon-simd

Sadly, it can not boot the kernel image provided on [2]. Anyway, I found there was only one thread has discussion on their work [3]. I want to hear more feedback on their idea on adding SIMD TCG IR.

I think my opinions are still the same -- interesting idea, but getting it to work with a set of IR ops which aren't target or host specific and getting it to give correct bit-for-bit results, rounding, flags, etc, is likely to be tricky. It would also be important to determine first whether Neon (or other SIMD) emulation performance is truly a major bottleneck.

-- PMM

#2 lore raw
Quoted 12 lines · Peter Maydell
Quoted 10 lines · 陳韋任 (Wei-Ren Chen)

While searching for QEMU SIMD issues, I found there was a paper presented in 2011 [1], and the source code is also public on [2]. However, it seems this project doesn't make any progress since last year. I update their change to upstream and you can download from here:

  $ git clone git://github.com/azru0512/qemu.git -b neon-simd

Sadly, it can not boot the kernel image provided on [2]. Anyway, I found there was only one thread has discussion on their work [3]. I want to hear more feedback on their idea on adding SIMD TCG IR.

Quoted 6 lines

I think my opinions are still the same -- interesting idea, but getting it to work with a set of IR ops which aren't target or host specific and getting it to give correct bit-for-bit results, rounding, flags, etc, is likely to be tricky. It would also be important to determine first whether Neon (or other SIMD) emulation performance is truly a major bottleneck.

I found the problem and now it can boot the kernel image and run the
test. The authors claim they design the general SIMD IR after studying various SIMD ISA. I am not an expert, and only can decide if it's true or not by writing another frontend. Well, one of reasons I am studying their work is to see SIMD IR could benifit our QEMU+LLVM binary translator. ;)

Regards,
chenwj

Signature · 5 lines
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj
#3 lore raw
In reply to Peter Maydell

Il 06/03/2013 04:47, Peter Maydell ha scritto:

Quoted 12 lines · 陳韋任 (Wei-Ren Chen)
Quoted 10 lines

While searching for QEMU SIMD issues, I found there was a paper presented in 2011 [1], and the source code is also public on [2]. However, it seems this project doesn't make any progress since last year. I update their change to upstream and you can download from here:

  $ git clone git://github.com/azru0512/qemu.git -b neon-simd

Sadly, it can not boot the kernel image provided on [2]. Anyway, I found there was only one thread has discussion on their work [3]. I want to hear more feedback on their idea on adding SIMD TCG IR.

Quoted 6 lines

I think my opinions are still the same -- interesting idea, but getting it to work with a set of IR ops which aren't target or host specific and getting it to give correct bit-for-bit results, rounding, flags, etc, is likely to be tricky. It would also be important to determine first whether Neon (or other SIMD) emulation performance is truly a major bottleneck.

SSE operations, while not a bottleneck, are the top helpers in the profile when booting Linux on x86.

Using common code to generate the simplest unrolled SIMD operations (logical operations, add, subtract, compare to zero) would already help a lot, I think.

Paolo

#4 lore raw
Quoted 8 lines · Paolo Bonzini

Il 06/03/2013 04:47, Peter Maydell ha scritto:

Quoted 6 lines

I think my opinions are still the same -- interesting idea, but getting it to work with a set of IR ops which aren't target or host specific and getting it to give correct bit-for-bit results, rounding, flags, etc, is likely to be tricky. It would also be important to determine first whether Neon (or other SIMD) emulation performance is truly a major bottleneck.

Quoted 6 lines

SSE operations, while not a bottleneck, are the top helpers in the profile when booting Linux on x86.

Using common code to generate the simplest unrolled SIMD operations (logical operations, add, subtract, compare to zero) would already help a lot, I think.

Yeah, I don't mean to say it's a bad idea, just that there's a long distance between a neat tech demo/research paper and productised code that can be committed to mainline :-)

-- PMM