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

use specific commit of amalgamate for single-header branch #2437

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

Conversation

mehmetyusufoglu
Copy link
Contributor

@mehmetyusufoglu mehmetyusufoglu commented Dec 6, 2024

This is a solution to issue #2431

Problem [Updated]

  • The commit a904e3255cf05a92d32036e636e21378a2681071 (of amalgamate repo) starts looking for include file paths which does not include underschore charecter, If there is an "_" the file is not detected as an #inlude line and cannot be embedded to the resulting single header
    #include "alpaka/queue/cuda_hip/QueueUniformCudaHipRt.hpp"

Solution

  • The directory name "alpaka/queue/cuda_hip" is changed with "alpaka/queue/cuda-hip", hence correspoding #include lines are also changed.
  • Since we don't use CamelCase in directory names, or no capital letters is used this seems to be a resonable solution

@mehmetyusufoglu mehmetyusufoglu marked this pull request as draft December 6, 2024 13:29
@mehmetyusufoglu
Copy link
Contributor Author

mehmetyusufoglu commented Dec 11, 2024

@psychocoderHPC

There are some files which has #include directive inside #ifdef directive like the file alpaka/include/alpaka/kernel/TaskKernelGpuUniformCudaHipRt.hpp. Did you mean those files could be reason of the problem?


#if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) || defined(ALPAKA_ACC_GPU_HIP_ENABLED)

#    if !defined(ALPAKA_HOST_ONLY)

#        include "alpaka/core/BoostPredef.hpp"

#        if defined(ALPAKA_ACC_GPU_CUDA_ENABLED) && !BOOST_LANG_CUDA
#            error If ALPAKA_ACC_GPU_CUDA_ENABLED is set, the compiler has to support CUDA!
#        endif

@SimeonEhrig
Copy link
Member

  • The latest working commit of amalgamate repo is from July 17, 2024. Therefore it is used
    a4796f0515fbc56d375a5013dd9004605df9c761

@mehmetyusufoglu Do you know, why it is not working anymore? I checked the next commit and it is only adding test cases. Therefore it should also work.

In general it is better to find out what was changed in the amalgamate script and fix our code than sticking on a old commit. If it to complicated to fix, we can stick on a specific commit hash.

@mehmetyusufoglu
Copy link
Contributor Author

  • The latest working commit of amalgamate repo is from July 17, 2024. Therefore it is used
    a4796f0515fbc56d375a5013dd9004605df9c761

@mehmetyusufoglu Do you know, why it is not working anymore? I checked the next commit and it is only adding test cases. Therefore it should also work.

In general it is better to find out what was changed in the amalgamate script and fix our code than sticking on a old commit. If it to complicated to fix, we can stick on a specific commit hash.

The error is introduced by a904e3255cf05a92d32036e636e21378a2681071, the second after the one i used to go back to solve the problem. It is quite long.

I am trying to understand what is the reason introduced by this commit.

@SimeonEhrig
Copy link
Member

  • The latest working commit of amalgamate repo is from July 17, 2024. Therefore it is used
    a4796f0515fbc56d375a5013dd9004605df9c761

@mehmetyusufoglu Do you know, why it is not working anymore? I checked the next commit and it is only adding test cases. Therefore it should also work.
In general it is better to find out what was changed in the amalgamate script and fix our code than sticking on a old commit. If it to complicated to fix, we can stick on a specific commit hash.

The error is introduced by a904e3255cf05a92d32036e636e21378a2681071, the second after the one i used to go back to solve the problem. It is quite long.

I am trying to understand what is the reason introduced by this commit.

I was already in fear that this PR introduced the problem :-(

@mehmetyusufoglu
Copy link
Contributor Author

mehmetyusufoglu commented Dec 17, 2024

  • The latest working commit of amalgamate repo is from July 17, 2024. Therefore it is used
    a4796f0515fbc56d375a5013dd9004605df9c761

@mehmetyusufoglu Do you know, why it is not working anymore? I checked the next commit and it is only adding test cases. Therefore it should also work.
In general it is better to find out what was changed in the amalgamate script and fix our code than sticking on a old commit. If it to complicated to fix, we can stick on a specific commit hash.

The error is introduced by a904e3255cf05a92d32036e636e21378a2681071, the second after the one i used to go back to solve the problem. It is quite long.
I am trying to understand what is the reason introduced by this commit.

I was already in fear that this PR introduced the problem :-(

Ok, they restricted the #included file name search and file paths which includes "_" can not be detected. Hence #include file path which consists "_" can not found. #include "alpaka/queue/cuda_hip/QueueUniformCudaHipRt.hpp

//change at amalgamate that restrict include path of included file
-       [[ $line =~ ^[\ \       ]*\#[\ \t]*include[\ \t]*\".*\".* ]]
+       [[ $line =~ ^[\ \       ]*\#[\ \        ]*include[\ \   ]*\"[A-Za-z0-9\+\.\/\-]+\".* ]]

@mehmetyusufoglu mehmetyusufoglu marked this pull request as ready for review December 19, 2024 09:23
@psychocoderHPC psychocoderHPC added this to the 2.0.0 milestone Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants