Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for CMake generators when installing dependencies. #3619

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

amd-jmacaran
Copy link
Contributor

  • cget tool supports -G parameter to specify generator. Reference
  • This code change provides capability to leverage that support and let user pick a generator with install_deps.cmake, limiting to Ninja or Unix Makefiles at the moment.
  • Example Usage: cmake -P install_deps.cmake --prefix $(HOME))/miopen-deps --generator Ninja
  • Trial run on Azure VM with 64 cores cut down execution time of this script by a few minutes. Pipeline Log

Comment on lines +127 to +133
if(DEFINED GENERATOR)
cget(install -G ${GENERATOR} -U ROCm/rocm-recipes@92c6695449c85887962f45509b376f2eb0d284f7)
cget(install -G ${GENERATOR} -U -f requirements.txt)
else()
cget(install -U ROCm/rocm-recipes@92c6695449c85887962f45509b376f2eb0d284f7)
cget(install -U -f requirements.txt)
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(DEFINED GENERATOR)
cget(install -G ${GENERATOR} -U ROCm/rocm-recipes@92c6695449c85887962f45509b376f2eb0d284f7)
cget(install -G ${GENERATOR} -U -f requirements.txt)
else()
cget(install -U ROCm/rocm-recipes@92c6695449c85887962f45509b376f2eb0d284f7)
cget(install -U -f requirements.txt)
endif()
cget(install ${CGET_EXTRA_OPTIONS} -U ROCm/rocm-recipes@92c6695449c85887962f45509b376f2eb0d284f7)
cget(install ${CGET_EXTRA_OPTIONS} -U -f requirements.txt)

I suggest instead of having a dedicated generator value having an CGET_EXTRA_OPTIONS cmake variable. That would allow adding support for more options when needed without making a huge if-else tree or rewriting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants