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

Added simple cmake script to build the project #1

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

Conversation

dkargin
Copy link

@dkargin dkargin commented May 29, 2023

Project can be built with modern CMake

Copy link
Owner

@spthm spthm left a comment

Choose a reason for hiding this comment

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

Hi @dkargin, thanks for opening this PR.

I am not very familiar with cmake, and currently do not have access to a machine to test these build changes; however, it looks to me like there are a few differences between this and the behaviour of the original Makefiles (see comments on CMakeLists.txt).

add_executable(cmem cmem.cu)
add_executable(diverge diverge.cu diverge2.cu diverge3.cu path.cu)
add_executable(global global.cu)
add_executable(icache icache.cu icache_kernels1.cu icache_kernels2.cu icache_kernels3.cu icache_kernels4.cu)
Copy link
Owner

Choose a reason for hiding this comment

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

In the original Makefiles, this executable is built as icache1.

The Makefiles also build icache2, icache3 and icache4.

enable_language(CUDA)

add_executable(cmem cmem.cu)
add_executable(diverge diverge.cu diverge2.cu diverge3.cu path.cu)
Copy link
Owner

Choose a reason for hiding this comment

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

The Makefile-diverge compiles diverge2.cu to diverge2.cu_sm_12_o with -arch sm_12 (because it is listed as CUFILES_sm_12=diverge2.cu). Similar arch-specific compiles happen with other targets.

I do not think that behaviour is reproduced here?

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