tvm icon indicating copy to clipboard operation
tvm copied to clipboard

[Relay][Pass]Implementation of a custom pass to extend 8bit Conv2D with Checksum Calculation in Relay

Open jokap11 opened this issue 1 year ago • 16 comments

Hello Everyone,

I assume that this automated Checksum calculation might be helpful for somebody to detect Soft Faults during the calculation of a Conv2D operation.

So I combined the knowledge from Hari. et. Al's Making Convolutions Resilient Via Algorithm-Based Error Detection Techniques and Uzair's Efficient Software-Implemented HW Fault Tolerance for TinyML Inference in Safety-critical Applications to support both depthwise and standard Conv2D. This pass adds multiple relay nodes and generates one output Tuple with the original result and additional boolean output for each "secured" Conv2D to recognize how many soft faults happened during the whole NN.

I am grateful for any tips/improvements in the code, Johannes

jokap11 avatar Nov 15 '23 15:11 jokap11

+1

LionWY avatar Dec 11 '23 08:12 LionWY

+1

FONickReichard avatar Dec 12 '23 18:12 FONickReichard

PromIseKit (the core framework) doesn’t, but its extensions probably do, eg. PMKCoreLocation.

It seems to me this isn't a framework requirement, but apps will need to specify the reasons. Happy to proven wrong, but in that case I don’t see how we can provide the reason.

We may need to split extensions up into more pieces so app developers can import on a per functionality basis. Not sure I can see another way to do it.

If so we may need to drop support for Carthage and possibly CocoaPods.

mxcl avatar Dec 20 '23 16:12 mxcl

Hey @mxcl ,

~~I believe this sums it up nicely: "Starting in spring 2024, you must include the privacy manifest for any SDK listed below when you submit new apps in App Store Connect that include those SDKs, or when you submit an app update that adds one of the listed SDKs as part of the update."~~
https://developer.apple.com/support/third-party-SDK-requirements/

Screenshot from the docs that @nokiaowner provided. Screenshot 2023-12-20 at 10 39 36 AM

~~The WWDC video above at timestamp 10:30 also mentions this. SDK owners are required to provide the details to the .xcprivacy file.~~

The Airbnb lottie-ios SDK has a nice implementation of this new requirement: https://github.com/airbnb/lottie-ios/pull/2252

~~As far as the implementation goes, adding the PrivacyInfo.xcprivacy file with the requires & linking it to the Package.swift PromiseKit target would be a great starting point for SPM support.~~

12/21/23 Edit: PromiseKit is not listed in the required SDKs in the requirements link I shared above. The docs & wwdc lead me to believe that all 3rd party SDKs should have the below snippet at a minimum. We'll see how this unfolds as we get closer to Spring of 2024.

<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>NSPrivacyTracking</key>
	<false/>
</dict>
</plist>

FONickReichard avatar Dec 20 '23 18:12 FONickReichard

Thanks everyone, we have the info we need and can add the privacy manifests to all PromiseKit frameworks. Not sure how CocoaPods intends to handle this yet tho. Will sniff about.

mxcl avatar Dec 27 '23 06:12 mxcl

Hello,

@mxcl Thanks for taking care of this. Is there a tentative date and associated target release version for privacy manifest to be included in the SDK?

Thanks

nokiaowner avatar Jan 05 '24 13:01 nokiaowner

The community should feel free to implement this in PromiseKit core (here) then we can easily copy it to the extensions.

I work full time. More than full time. I cannot promise any time on this project at this point.

mxcl avatar Jan 09 '24 19:01 mxcl

Hello,

Fair enough, just wanted to suggest to treat this as high priority. We don't know exactly the day when Apple will enforce the privacy manifest requirement. All we know so far is that's for spring of this year.

Thanks

nokiaowner avatar Jan 26 '24 10:01 nokiaowner

Hello,

Bumping as I believe this is important for many.

Thanks

nokiaowner avatar Mar 08 '24 13:03 nokiaowner

Hi,

Bumping this as the deadline from Apple is approaching. Alternatively can you please provide us with a temporary solution and give us the .plist?

Thanks

catalinaIonela avatar Apr 04 '24 15:04 catalinaIonela

Actually you can add the privacy manifest directly to your app, so you don't have to add it to each open source library you are using. But anyway, we can add it to PromiseKit #1342.

RomanPodymov avatar Apr 10 '24 06:04 RomanPodymov

Actually you can add the privacy manifest directly to your app, so you don't have to add it to each open source library you are using. But anyway, we can add it to PromiseKit #1342.

I think this is incorrect. We need to first add it to our own app, and make sure that all the 3rd parties apps that we are using implements it as well.

Marvel2002 avatar Apr 10 '24 07:04 Marvel2002

Actually you can add the privacy manifest directly to your app, so you don't have to add it to each open source library you are using. But anyway, we can add it to PromiseKit #1342.

I think this is incorrect. We need to first add it to our own app, and make sure that all the 3rd parties apps that we are using implements it as well.

That is indeed the case.

nokiaowner avatar Apr 12 '24 12:04 nokiaowner

Actually you can add the privacy manifest directly to your app, so you don't have to add it to each open source library you are using. But anyway, we can add it to PromiseKit #1342.

I think this is incorrect. We need to first add it to our own app, and make sure that all the 3rd parties apps that we are using implements it as well.

That is indeed the case.

We had the same issue with a few dependencies. Even though each 3rd party SDK should have their privacy manifest, we did add the missing reasons to our manifest, and as of today, Apple did accept our submission without sending us another warning. It's only a workaround, and not sure how long this will be accepted. But at least for now, it's not a blocker if the 3rd party SDK's have missing infos in the manifest.

marcoboerner avatar May 07 '24 15:05 marcoboerner

Actually you can add the privacy manifest directly to your app, so you don't have to add it to each open source library you are using. But anyway, we can add it to PromiseKit #1342.

I think this is incorrect. We need to first add it to our own app, and make sure that all the 3rd parties apps that we are using implements it as well.

That is indeed the case.

We had the same issue with a few dependencies. Even though each 3rd party SDK should have their privacy manifest, we did add the missing reasons to our manifest, and as of today, Apple did accept our submission without sending us another warning. It's only a workaround, and not sure how long this will be accepted. But at least for now, it's not a blocker if the 3rd party SDK's have missing infos in the manifest.

We had the same experience. But the question remains whether PromiseKit indeed needs its own Privacy manifest file.

jayeshkawli avatar May 07 '24 16:05 jayeshkawli

Actually you can add the privacy manifest directly to your app, so you don't have to add it to each open source library you are using. But anyway, we can add it to PromiseKit #1342.

I think this is incorrect. We need to first add it to our own app, and make sure that all the 3rd parties apps that we are using implements it as well.

That is indeed the case.

We had the same issue with a few dependencies. Even though each 3rd party SDK should have their privacy manifest, we did add the missing reasons to our manifest, and as of today, Apple did accept our submission without sending us another warning. It's only a workaround, and not sure how long this will be accepted. But at least for now, it's not a blocker if the 3rd party SDK's have missing infos in the manifest.

We had the same experience. But the question remains whether PromiseKit indeed needs its own Privacy manifest file.

It does, and not only the empty file, it should have all the required entries as well. I assume it's only a matter of time before Apple won't accept the workaround mentioned above anymore.

marcoboerner avatar May 07 '24 16:05 marcoboerner