Add Python support for Vitis AI v1.3.2 package in focal

Bug #1958484 reported by ethan.hsieh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vitis-ai (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Xilinx wants to add python support for Vitis AI v1.3.2 package

The following files will be added after applying the patch for python support.
/usr/lib/python3/dist-packages/runner.py
/usr/lib/python3/dist-packages/vart.cpython-38-aarch64-linux-gnu.so
/usr/lib/python3/dist-packages/xir.cpython-38-aarch64-linux-gnu.so

 * Xilinx doesn't intend to support v1.3.2 package in Jammy. Vitis AI package in Jammy will be upgraded to newer version with python support. So, the patch for python support won't be applied to jammy.

[Test Plan]

 * Xilinx will perform validation of these packages

[Where problems could occur]

 * This is a low-risk SRU as python libraries do not exist on focal yet, so in theory no current user would be affected

tags: added: oem-priority originate-from-1956367
description: updated
Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :
Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :

The patch in comment#1 and test packages have been reviewed and verified by Xilinx.

Here is the feedback from Xilinx:
I think this is good to go - my tests are working, and another one of our apps guys tested with their larger application and it is working. You can move forward with the SRU process.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "focal.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Hey Ethan! Thanks for preparing the debdiff! It's usually quite a hard requirement for features to be present in the current devel release before going forward with SRUs. You mention that for jammy the plan is to get a newer upstream version - what is the timeline for that? Since the only way I can accept this into focal is for us to have guarantee that the new upstream version will be released shortly or if we get the same patches pushed to jammy.

Is this planned for the nearest week or two?

Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :

@Łukasz
I'm waiting for the feedback from Xilinx. The only thing I know at this moment is that we will upgrade the package to newer version (1.4 or 2.0) before 22.04 stock ubnutu is released formally. Xilinx doesn't intend to support v1.3.2 package in Jammy. The package in formal Xilinx 22.04 desktop image won't be v1.3.2. It seems to me that getting the patch pushed to jammy is a redundant work. I'm wondering if we can follow Xilinx's plan to apply this patch to focal only?

Revision history for this message
ethan.hsieh (ethan.hsieh) wrote :

@Łukasz

I uploaded debdiff for jammy.
When I built the test package for jammy, I got the following error messages.
So, I created a patch called build-with-std-gnu++17.patch to fix build failure.

Here is the error message when building the package without -std=gnu++17:
/<<PKGBUILDDIR>>/tools/Vitis-AI-Runtime/VART/xir/include/xir/util/any.hpp:28:2: error: #error "must enable c++17"
   28 | #error "must enable c++17"
      | ^~~~~
In file included from /<<PKGBUILDDIR>>/tools/Vitis-AI-Runtime/VART/xir/include/xir/tensor/tensor.hpp:22,
                 from /<<PKGBUILDDIR>>/tools/Vitis-AI-Runtime/VART/xir/src/xir/util/internal_util.hpp:28,
                 from /<<PKGBUILDDIR>>/tools/Vitis-AI-Runtime/VART/xir/src/xir/util/internal_util.cpp:17:
/<<PKGBUILDDIR>>/tools/Vitis-AI-Runtime/VART/xir/include/xir/attrs/attrs.hpp:109:22: error: ‘any’ in namespace ‘xir’ does not name a type
  109 | virtual const xir::any& get_attr(const std::string& key) const = 0;

Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello ethan.hsieh, or anyone else affected,

Accepted vitis-ai into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/vitis-ai/1.3.2-0ubuntu5~20.04.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in vitis-ai (Ubuntu Focal):
status: New → Fix Committed
tags: added: verification-needed verification-needed-focal
Changed in vitis-ai (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vitis-ai - 1.3.2-0ubuntu9

---------------
vitis-ai (1.3.2-0ubuntu9) jammy; urgency=medium

  * Build python libraries (LP: #1958484)
  * Build with -std=gnu++17 to fix build failure

 -- Ethan Hsieh <email address hidden> Fri, 07 Jan 2022 03:46:51 +0000

Changed in vitis-ai (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Terry ONeal (terryoneal3) wrote :

I tested this out against the python test cases in the Vitis-AI repo:

https://github.com/Xilinx/Vitis-AI/blob/v1.3.2/setup/mpsoc/VART/README.md
* resnet50_mt_py
* inception_v1_mt_py

Both were successful. I consider this bug fixed.

Packages tested:
vitis-ai-dnndk/focal-proposed,now 1.3.2-0ubuntu5~20.04.2 arm64 [installed]
vitis-ai-library/focal-proposed,now 1.3.2-0ubuntu5~20.04.2 arm64 [installed]
vitis-ai-runtime/focal-proposed,now 1.3.2-0ubuntu5~20.04.2 arm64 [installed]

tags: added: verification-done-focal
tags: removed: verification-needed-focal
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Normally we do not release packages to -updates on Fridays (as it's risky due to not being able to react to regressions during the weekend), but due to the nature of this change I'll be releasing it anyway. Thank you for the verification.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package vitis-ai - 1.3.2-0ubuntu5~20.04.2

---------------
vitis-ai (1.3.2-0ubuntu5~20.04.2) focal; urgency=medium

  * Build python libraries (LP: #1958484)

 -- Ethan Hsieh <email address hidden> Sat, 08 Jan 2022 05:50:51 +0000

Changed in vitis-ai (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for vitis-ai has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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