Skip to content

Decouple the building of benchmarks and tests#2439

Closed
leoluan2009 wants to merge 9 commits intofacebookincubator:mainfrom
leoluan2009:benchmarks
Closed

Decouple the building of benchmarks and tests#2439
leoluan2009 wants to merge 9 commits intofacebookincubator:mainfrom
leoluan2009:benchmarks

Conversation

@leoluan2009
Copy link
Contributor

@leoluan2009 leoluan2009 commented Sep 1, 2022

Tests and benchmarks targets are now de-coupled.
That means they can be built independently.
Shared functionality is moved to a common utility library.

Resolves #1704

@netlify
Copy link

netlify bot commented Sep 1, 2022

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit 86783c4
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/63213a3989306b0008bc84e8

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 1, 2022
@leoluan2009 leoluan2009 marked this pull request as draft September 1, 2022 15:55
@leoluan2009 leoluan2009 marked this pull request as ready for review September 2, 2022 02:12
@leoluan2009
Copy link
Contributor Author

cc @mbasmanova @kgpai @majetideepak can you help to review this pr? the build error is due to #2442

@kgpai
Copy link
Contributor

kgpai commented Sep 2, 2022

Hi @leoluan2009 , Can you give a brief description of how you have decoupled them ? Thanks !

@leoluan2009
Copy link
Contributor Author

leoluan2009 commented Sep 2, 2022

Hi @leoluan2009 , Can you give a brief description of how you have decoupled them ? Thanks !

use VELOX_ENABLE_BENCHMARKS to control whether to build benchmarks directory and use VELOX_BUILD_TESTING to control whether to build tests directory, if some benchmarks use import the files from tests directory, Add the files to utils subdirectory in tests. When VELOX_BUILD_TESTING is on or VELOX_BUILD_TEST_UTILS is on, will build tests/utils.

@kgpai
Copy link
Contributor

kgpai commented Sep 2, 2022

Thanks again @leoluan2009 , Based on my perusal, I see the following changes:

  • Move common test utilities to a separate library.
  • Create separate flag for Benchmarks and decouple benchmark building from tests.

Some questions:

  • Are benchmarks still built along with tests ? If not how should they be invoked ?
  • We run benchmark comparisons to catch performance regressions on merge to main ; We need to ensure that these dont break , due to these changes.

@leoluan2009
Copy link
Contributor Author

leoluan2009 commented Sep 2, 2022

Are benchmarks still built along with tests ? If not how should they be invoked ?

Not along with tests, use VELOX_ENABLE_BENCHMARKS or VELOX_ENABLE_BENCHMARKS_BASIC to control whether to build benchmarks, and if one of this two flags is on, set VELOX_BUILD_TEST_UTILS to on for import some common test utilities

@leoluan2009
Copy link
Contributor Author

We run benchmark comparisons to catch performance regressions on merge to main ; We need to ensure that these dont break , due to these changes.

This is still controlled by VELOX_ENABLE_BENCHMARKS_BASIC

@kgpai
Copy link
Contributor

kgpai commented Sep 2, 2022

Thanks @leoluan2009 , Can you make changes here : https://github.com/facebookincubator/velox/blob/main/.circleci/config.yml#L247 so that the benchmarks builds are not broken, as a part of this PR.

@majetideepak
Copy link
Collaborator

@leoluan2009 thank you for this work. I actually have an issue open here #1704

@leoluan2009
Copy link
Contributor Author

leoluan2009 commented Sep 6, 2022

@leoluan2009 thank you for this work. I actually have an issue open here #1704

Yes, I think I already follow the design for share functionality in #1704

@majetideepak
Copy link
Collaborator

@kgpai the benchmarks are still running with this change.
The benchmark target uses the right option.

velox/Makefile

Lines 95 to 96 in d9f1373

benchmarks-basic-build:
$(MAKE) release EXTRA_CMAKE_FLAGS="-DVELOX_BUILD_MINIMAL=ON -DVELOX_ENABLE_BENCHMARKS_BASIC=ON"

https://app.circleci.com/pipelines/github/facebookincubator/velox/12821/workflows/44ace784-d480-4dfe-9d36-fbc6d928d8da/jobs/76628

@majetideepak
Copy link
Collaborator

@leoluan2009
Copy link
Contributor Author

leoluan2009 commented Sep 7, 2022

@majetideepak
Copy link
Collaborator

@kgpai @Yuhta can you please merge this? Thanks.

@leoluan2009 leoluan2009 force-pushed the benchmarks branch 2 times, most recently from f844c82 to e0141b2 Compare September 13, 2022 04:05
@leoluan2009
Copy link
Contributor Author

cc @majetideepak @kgpai @Yuhta

@facebook-github-bot
Copy link
Contributor

@kgpai has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@kgpai
Copy link
Contributor

kgpai commented Sep 13, 2022

@majetideepak I will change bunch of places where relative path is used instead of absolute path.

@majetideepak
Copy link
Collaborator

@majetideepak I will change bunch of places where relative path is used instead of absolute path.

@kgpai thank you.

@leoluan2009
Copy link
Contributor Author

Hi, @majetideepak @kgpai, I fix all comments, would you please review again? Thanks!

kgpai pushed a commit to kgpai/torcharrow that referenced this pull request Sep 14, 2022
Summary:
Tests and benchmarks targets are now de-coupled.
That means they can be built independently.
Shared functionality is moved to a common utility library.

Resolves facebookincubator/velox#1704

X-link: facebookincubator/velox#2439

Reviewed By: Yuhta

Differential Revision: D39484543

Pulled By: kgpai

fbshipit-source-id: b8b0f3a2fec4651ee8b4fe9ca6304bd37b9be183
facebook-github-bot pushed a commit to pytorch/torcharrow that referenced this pull request Sep 15, 2022
Summary:
Pull Request resolved: #491

Tests and benchmarks targets are now de-coupled.
That means they can be built independently.
Shared functionality is moved to a common utility library.

Resolves facebookincubator/velox#1704

X-link: facebookincubator/velox#2439

Reviewed By: Yuhta

Differential Revision: D39484543

Pulled By: kgpai

fbshipit-source-id: 5ac888c81a6bbfbc5a1a1c4cfd41fa2c86199bc4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests and benchmarks must be decoupled

4 participants