Adds option of using ASM for BoringSSL in Python.#23483
Adds option of using ASM for BoringSSL in Python.#23483lidizheng merged 10 commits intogrpc:masterfrom
Conversation
|
|
|
prod:grpc/core/experimental/grpc_build_artifacts_multiplatform The full suite of test is triggered manually, not part of CI. |
|
@lidizheng based on CI it looks like windows will take more work, so I removed references there. Also I had the wrong filter for mac. |
|
I'm agree with you to drop Windows for now. The compiler setup could be quite different. |
|
@lidizheng I think the sanity tests were broken because of the change needed to boringSSL. The BoringSSL team provided another fix which I've now incorporated (and I believe updated the BoringSSL version to their latest commit. |
lidizheng
left a comment
There was a problem hiding this comment.
According to the test log for last commit, the Sanity Test looks fixable by running:
tools/buildgen/generate_projects.sh
tools/distrib/yapf_code.sh
On the other hand, the upgrade of BoringSSL allows us to remove hacks. That is great! But if we want to upgrade BoringSSL, the third party library upgrade needs to go in as a separate PR. These upgrades could break tests and may require rollbacks (like the upgrade of upb broke distribtest). Can you create a new PR for the upgrade?
src/boringssl/gen_build_yaml.py
Outdated
| # - crypto_test_data.cc is required to run boringssl_crypto_test but we already | ||
| # use the copy under third_party/boringssl-with-bazel so we just delete it | ||
| # - err_data.c is already under third_party/boringssl-with-bazel so we just delete it | ||
| generate_build_files.main([grpc_platform]) |
There was a problem hiding this comment.
This is a quality of life improvement, thanks!
|
FYI, the Sanity Checks can be run locally with: |
Thanks @lidizheng this helped :) I think most of the failures are do to the boringssl upgrade, this sanity checks locally are now passing for #23528 so once that is checked in we can rebase and hopefully they will pass here as well. |
|
will update this PR once #23568 is merged. |
|
@lidizheng i rebased (and unfortunately this required a force push) I think code should be reviewable now |
- Adds a new environment variable for turning on the build of ASM for boring SSL. - Only enables for x86_64 for now. I think this is likely the most common target and the only machine I have readily accessible.
Remove windows. Use proper filter for mac.
- Undo a bunch of hacks in src/boringssl/gen_build_yaml.py - Store the structued data in YAML/dependencies.py so we don't need to recreate the filters. - Update setup.py accordingly
|
@lidizheng had to force push again to resolve a conflict in setup.py |
lidizheng
left a comment
There was a problem hiding this comment.
Approved. Tests are green. Starting distribution tests at http://sponge/75aff762-464d-47a6-809c-0150d21cea49.
|
@lidizheng if i read the sponge link correctly it seems everything passed? Any more steps? |
|
@emkornfield The sponge link links to the parent Kokoro job, which has a child job. And that child job has a child-child job, which is the distribution test. That one is still ongoing. (I'm merely an end user of this infra system) |
|
thanks, I missed the additional spawned job. It looks like it failed compiling on some linux systems because the ".S" files are missing. Does need to be updated or is it likely someplace else that has the issue? |
|
@emkornfield After searching, it looks like the only place need to update. There isn't another reference to |
@lidizheng updated. |
|
@lidizheng looks like the child passed this time? |
|
Known failures: #23747 |
|
@emkornfield Thanks for the effort! It's hairy to get everything right in across platform compilation. Glad to see Python binary wheels finally utilize BoringSSL ASM optimization 🔥 |
|
Looking forward to the GCU savings :) I'll leave windows/32-bit platforms for someone else to look at |
| 'License :: OSI Approved :: Apache Software License', | ||
| ] | ||
|
|
||
| BUILD_WITH_BORING_SSL_ASM = os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', |
There was a problem hiding this comment.
Note that XYZ = os.environ.get('GRPC_BUILD_WITH_BORING_SSL_ASM', True) followed by if XYZ: test is fundamentally broken. I just ran into this.
even if you assign the string 'False', 'false', '0' or something like that, the non-empty string still evaluates as 'True'. In combination with the 'True' default value, there is now basically now way to disable this option.
(For options with default value False you can at least leave the env variable empty and that will evaluate as false).
There was a problem hiding this comment.
sorry about that. I think this was an oversight because I originally had this as false. Do you need me to patch this?
There was a problem hiding this comment.
np, but yeah a patch would be nice. Btw the way all the options are read from env variables is also kind of broken, but they at least can be used because they have default value False.
Ideally we'd replace the reading of boolean values from env variables everywhere (if you assign 'XYZ=False' or 'XYZ=false' that's still evaluated as True :-( )
Lines 109 to 169 in 711d1d7
@lidizheng since you reviewed this.
There was a problem hiding this comment.
Looks like there's already an issue for this: #24498

for boring SSL.
common target and the only machine I have readily accessible.
Relates to #22382
@lidizheng