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

Utilize all the cores when building and running tests #127

Merged
merged 2 commits into from
Sep 22, 2016

Conversation

pfultz2
Copy link
Contributor

@pfultz2 pfultz2 commented Sep 22, 2016

This sets up the cmake to call the 'ProcessorCount' module to build and test with all the cores available, instead of just setting it to 8.

@whchung
Copy link
Collaborator

whchung commented Sep 22, 2016

@pfultz2 thanks. learnt a new function in CMake.

@whchung whchung merged commit f6f7ceb into ROCm:develop Sep 22, 2016
@@ -28,7 +28,8 @@ ENDIF (NOT CLANG_URL)
set(CMAKE_MACOSX_RPATH 1)

IF (NOT NUM_BUILD_THREADS)
SET(NUM_BUILD_THREADS 8)
include(ProcessorCount)
ProcessorCount(NUM_BUILD_THREADS)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@pfultz2 Would it make sense if we separate this variable to 2:

  • NUM_BUILD_THREADS sets the number of cores used for building HCC
  • NUM_TEST_THREADS sets the number of cores used for testing HCC

To my empirical experience, setting NUM_BUILD_THREADS to number of available CPU cores "times 2" yields the best CPU utilization on my build cluster consisting of 3 x86 boxes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, it already is two separate variables. The NUM_BUILD_THREADS does not affect the threads for testing. Right now, I just called the variable N, but it does make sense to rename it to NUM_TEST_THREADS.

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.

2 participants