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 limited PR testing #101

Merged
merged 17 commits into from
Dec 17, 2024
Merged

Add limited PR testing #101

merged 17 commits into from
Dec 17, 2024

Conversation

cwpearson
Copy link
Contributor

@cwpearson cwpearson commented Nov 14, 2024

Add PR tests a variety of exercises against Kokkos / Kokkos Kernels master branches. This only builds the exercises, it does not run their solutions.

Since it's a bit clumsy to build every exercise, this CI uses a script to do it (batch for Windows, bash for Linux/macOS).

  • Linux / g++ / OpenMP
  • macOS / clang++ / Threads
  • Windows / cl / Serial
  • Linux / nvcc / CUDA
  • More exercises to test?
  • Run Solutions where possible?

Many exercises did not immediately build, have certain execution spaces hardcoded, or had other problems. Resolving those is left as future work.

@cwpearson cwpearson force-pushed the ci/github-pr branch 2 times, most recently from 62d1477 to e67f599 Compare November 15, 2024 14:06
Copy link
Member

@cedricchevalier19 cedricchevalier19 left a comment

Choose a reason for hiding this comment

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

I think it is a very good start.

In the future we can remove the scripts (with a global CMake #91). Perhaps these scripts can be relocated in a more hidden place?

The nightly should be run from Kokkos repo using workflow dispatch.

@cwpearson cwpearson marked this pull request as ready for review November 18, 2024 19:32
Copy link
Member

@cedricchevalier19 cedricchevalier19 left a comment

Choose a reason for hiding this comment

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

I think we cannot run the proposed action while .github/workflows is empty.
@cwpearson, did you run the PR with a runner like https://github.com/nektos/act ?

@masterleinad
Copy link
Contributor

@cwpearson
Copy link
Contributor Author

If someone with rights can merge this, the next steps would probably be

  • run the solutions
  • fix the tutorials I couldn't immediately compile (where appropriate)

@cwpearson cwpearson mentioned this pull request Nov 20, 2024
9 tasks
Copy link
Contributor

@masterleinad masterleinad left a comment

Choose a reason for hiding this comment

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

Looks good as a first step.

.github/workflows/github-pr-linux-container.yaml Outdated Show resolved Hide resolved
cmake -S "${GITHUB_WORKSPACE}"/kokkos -B "${GITHUB_WORKSPACE}"/build-kokkos
-DCMAKE_INSTALL_PREFIX="${GITHUB_WORKSPACE}"/install-kokkos
-DCMAKE_CXX_COMPILER="${GITHUB_WORKSPACE}"/kokkos/bin/nvcc_wrapper
-DCMAKE_BUILD_TYPE=RelWithDebInfo
Copy link
Member

Choose a reason for hiding this comment

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

Fine but noting that it is the default hence unnecessary

.github/workflows/github-pr-windows.yaml Show resolved Hide resolved
Scripts/ci-configure-build-test.bat Outdated Show resolved Hide resolved
EXERCISES+=("$e"/Solution)
done

export Kokkos_ROOT="$kokkos_root"
Copy link
Member

Choose a reason for hiding this comment

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

Why do we handle Kokkos and KokkosKernels differently and why don't we just set these environment variable externally?

backend="$6"

# These are exercises with CMakeLists.txt in Begin and Solution subdirectories
# TODO: advanced_reductions seems broken
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you elaborate?

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, Begin doesn't compile.

# TODO: advanced_reductions seems broken
# TODO: hpcbind does not use cmake
# TODO: instances does not use cmake
# TODO: parallel_scan seems broken
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you elaborate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It just means there were compilation errors when I tried to compile it in this framework. I didn't spend more than 30s looking at any of them. I figured fixing them up could be follow-on work.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, see #104.

@cwpearson
Copy link
Contributor Author

Is this okay to merge for now, and we can clean up more later?

@dalg24 dalg24 merged commit 6a2d511 into kokkos:main Dec 17, 2024
@cwpearson cwpearson deleted the ci/github-pr branch December 17, 2024 19:20
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.

4 participants