TBB lacks AArch64 support

Bug #1091353 reported by Marcin Juszkiewicz
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro AArch64 cross-distro work
Fix Released
Critical
Leif Lindholm
Linaro OpenEmbedded
Fix Released
Critical
Unassigned

Bug Description

http://threadingbuildingblocks.org/ lacks AArch64 support.

There is armv7 support: https://wiki.linaro.org/OfficeofCTO/ThreadingBuildingBlocks done by Linaro

Anmar Oueja (anmar)
Changed in linaro-aarch64:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Leif Lindholm (leif-lindholm)
Revision history for this message
Leif Lindholm (leif-lindholm) wrote :

Attached patch apples onto tbb41_20121003oss and builds correctly on oe 12.12.

Not tested, not sanitized, but builds (and might work).

Will clash with aarch32 patches, so don't apply both.

Revision history for this message
Owen Yamauchi (owen-yamauchi) wrote :

This is a requirement for building and running HHVM (even without the JIT functionality).

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Leif: your patch depends on armhf one:

Applying patch tbb41-aarch64.patch
patching file build/linux.inc
Hunk #1 succeeded at 105 (offset 1 line).
patching file include/tbb/machine/linux_aarch64.h
patching file include/tbb/tbb_machine.h
Hunk #1 succeeded at 196 (offset -27 lines).
Hunk #2 FAILED at 393.
Hunk #3 FAILED at 434.
2 out of 3 hunks FAILED -- rejects in file include/tbb/tbb_machine.h
patching file src/tbbmalloc/frontend.cpp
Hunk #1 succeeded at 598 (offset -55 lines).
Patch tbb41-aarch64.patch does not apply (enforce with -f)

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Ah, I used Debian source...

Marcin Juszkiewicz (hrw)
Changed in linaro-oe:
status: Confirmed → Fix Committed
Changed in linaro-aarch64:
status: Confirmed → In Progress
Revision history for this message
Leif Lindholm (leif-lindholm) wrote :

Current status:
first test in suite fails with
---
./test_tbb_version.exe
Error (step 1): Internal test error
Assertion k>=0 failed on line 129 of file ../../src/tbb/tbb_main.cpp
Detailed description: removed __TBB_InitOnce ref that was not added?
make[1]: *** [test_tbb_plain] Aborted
make[1]: Leaving directory `/home/leif/TBB/tbb41_20121003oss/build/linux_aarch64_gcc_cc4.7.3_libc2.17_kernel3.7.0_debug'
make: *** [tbb_test_debug_no_depends] Error 2
---
Debugging hampered by GDB issue, raised as #1103489.

Fathi Boudra (fboudra)
Changed in linaro-oe:
assignee: nobody → Marcin Juszkiewicz (hrw)
Revision history for this message
Steve Capper (steve-capper) wrote :

Ok using, the latest Linaro ARMv8 release:
http://releases.linaro.org/latest/openembedded/aarch64/vexpress64-openembedded_lamp-armv8_20130320-274.img.gz
and,
http://releases.linaro.org/latest/openembedded/aarch64/img-foundation.axf

I was able to build and run the debug tests for libTBB out of the box:
http://threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb41_20130314oss_src.tgz

One unit test: test_task_priority.exe took too long to run and I terminated it. (I am running this on its own).
For reference I have attached the test run log.

--
Steve

Revision history for this message
Steve Capper (steve-capper) wrote :

[Also I ran the Foundation model simulating 4 cores]

--
Steve

Revision history for this message
Anmar Oueja (anmar) wrote : Re: [Bug 1091353] Re: TBB lacks AArch64 support

Just so I am clearn. The tests your are running on libTBB are using
the v8 acceleration and not the arch independent (slow) feature. I
am really glad we are way further than initially thought. Once you
figure out the issues with test_task_priority.exe, let me know please.
Once libTBB is ready for v8, I will get Marcin to package it and make
it available on the OE build for Facebook to use.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Steve: I see that 20130314 has ARMv7a support added but for AArch64 still generic support is used. Are there plans for AArch64 version?

Revision history for this message
Steve Capper (steve-capper) wrote :

I have no plans currently on extending TBB with ARMv8 specific code.
Mainly as I would much prefer to run V8 acceleration code on hardware to validate it.

If V8 acceleration is required for something urgently, please do let us know.

Cheers,
--
Steve

Revision history for this message
Steve Capper (steve-capper) wrote :

Also, the test_task_priority.exe test run passed too. All unit tests pass on debug mode in the Foundation model.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

meta-linaro updated to 20130314 version and patch was sent to OE to update there

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Patch got rejected by OE because now TBB builds only for ARMv7a - armv5te builds break with:

| ../../include/tbb/machine/gcc_armv7.h:39:2: error: #error Threading
Building Blocks ARM port requires an ARMv7-a architecture.

Revision history for this message
Anmar Oueja (anmar) wrote :

Marcin: can you please file a bug capturing the armv5 breakage.

On 9 April 2013 06:46, Marcin Juszkiewicz <email address hidden> wrote:
> Patch got rejected by OE because now TBB builds only for ARMv7a -
> armv5te builds break with:
>
> | ../../include/tbb/machine/gcc_armv7.h:39:2: error: #error Threading
> Building Blocks ARM port requires an ARMv7-a architecture.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1091353
>
> Title:
> TBB lacks AArch64 support
>
> Status in Linaro AArch64 cross-distro work:
> In Progress
> Status in Linaro OpenEmbedded:
> Fix Committed
>
> Bug description:
> http://threadingbuildingblocks.org/ lacks AArch64 support.
>
> There is armv7 support:
> https://wiki.linaro.org/OfficeofCTO/ThreadingBuildingBlocks done by
> Linaro
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/linaro-aarch64/+bug/1091353/+subscriptions

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :
Fathi Boudra (fboudra)
Changed in linaro-oe:
assignee: Marcin Juszkiewicz (hrw) → nobody
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

OpenEmbedded is using generic code so we can mark it released.

Changed in linaro-oe:
status: Fix Committed → Fix Released
Revision history for this message
Riku Voipio (riku-voipio) wrote :

Upstream TBB builds an passes testsuite fine on Aarch64:

https://launchpadlibrarian.net/165316381/buildlog_ubuntu-trusty-arm64.tbb_4.2~20130725-1.1ubuntu1_UPLOADING.txt.gz

For optimization work, I think ./include/tbb/machine/gcc_armv7.h could be used as-is on Armv8 as well?

Changed in linaro-aarch64:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.