NobuoTsukamoto / meta-tensorflow-lite

Yocto layer for TensorFlow Lite interpreter with Python / C++.
MIT License
33 stars 18 forks source link

[Feat Request] SRCREV should be derived from ${PV} #2

Closed madscientist42 closed 2 years ago

madscientist42 commented 3 years ago

The cleanest way to doing this when a vendor is tagging revision numbers, even if there's branch info is to use the value in PV to derive the results.

Suggest that you consider doing something similar to this:

# Compute branch info from ${PV} as Base PV... BPV = "${@'.'.join(d.getVar('PV').split('.')[0:2])}" # Since they tag off of something resembling ${PV}, use it. SRCREV = "v${PV}" SRC_URI = " \ git://github.com/tensorflow/tensorflow.git;branch=r${BPV} \

As you can see, this programmatically cracks off the first two digits every time ${PV} is supplied and then lets you leverage TensorFlow's tagging and branching to make a generic for this. I arrived here as a result of my (Sadly, failed) work on trying to make one unifying solution for all. It's not so much that it's un-doable...I just don't do anything with TF itself except at work- and I needed CUDA 10.0 support and 2.4.x requires CUDA 10.1 or later with Tensor Cores support. When they roll out new versions, you need only handle the patch cases as needed and validate it's not broken and stomp out a version without so much as lookng at commit hashes, etc.

I may have a bit more to add as a pull request later on. There probably should be something for supporting the C/C++ bindings, etc. for at least the latest (2.4.0, master...) as it's likely to be as useful as this is for people on targets.

NobuoTsukamoto commented 3 years ago

The cleanest way to doing this when a vendor is tagging revision numbers, even if there's branch info is to use the value in PV to derive the results.

Thank you for the very useful information ! With the release of v2.4.1 for TensorFlow, I was able to work fine with PV values. https://github.com/NobuoTsukamoto/meta-tensorflow-lite/blob/b6d4f29f301d47062d0b15022294aaf226c42187/recipes-framework/tensorflow-lite/python3-tensorflow-lite_2.4.1.bb

NobuoTsukamoto commented 3 years ago

I needed CUDA 10.0 support and 2.4.x requires CUDA 10.1 or later with Tensor Cores support.

Could you tell us a little more detail? Do you need the TensorFlow with CUDA Yocto recipe? (Is it for NVIDIA JETSON? or x86 PC?) If you need anything in this repository, please let us know the details. I'm sorry if I misunderstood.

Thanks.