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

Development of hiopVectorCuda #572

Merged
merged 17 commits into from
Dec 13, 2022
Merged

Development of hiopVectorCuda #572

merged 17 commits into from
Dec 13, 2022

Conversation

nychiang
Copy link
Collaborator

@nychiang nychiang commented Nov 25, 2022

implementation of "hiopVectorCuda"
Maybe this file/class should be named as "hiopVectorCudaPar" since it also supports MPI (verified by unit tests).

Right now I manually set "mem_space" to "cuda" to run the unit tests. More works are required to address this issue after we merge #543 (memory backends and execution policies)

@nychiang nychiang marked this pull request as ready for review December 5, 2022 07:30
Copy link
Collaborator

@cameronrutherford cameronrutherford left a comment

Choose a reason for hiding this comment

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

Some relatively minor feedback

src/LinAlg/hiopVectorIntCuda.hpp Show resolved Hide resolved
src/LinAlg/hiopVectorIntCuda.cpp Show resolved Hide resolved
src/LinAlg/hiopVectorCuda.hpp Show resolved Hide resolved
src/LinAlg/hiopVectorCuda.hpp Outdated Show resolved Hide resolved
src/LinAlg/hiopVectorCuda.hpp Outdated Show resolved Hide resolved
src/Drivers/CMakeLists.txt Outdated Show resolved Hide resolved
src/LinAlg/hiopLinAlgFactory.cpp Show resolved Hide resolved
src/LinAlg/hiopLinAlgFactory.cpp Show resolved Hide resolved
set_match_pattern_cu<<<num_blocks,block_size>>>(n_local, yd, xd, id);
}

/** @brief Adjusts duals. */
Copy link
Collaborator

Choose a reason for hiding this comment

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

I only skimmed this file, but I assume these comments should be in the header instead?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it i helpful to have brief description of each function next to the source code and the long one in the header files. Doxygen can merge them.

src/LinAlg/hiopVectorCuda.cpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@cnpetra cnpetra left a comment

Choose a reason for hiding this comment

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

address the other reviewer's comments and will merge. Re: data_host_, we will revisit when we address the 'copyTo/FromDev methods from the abstract vector interface.

Copy link
Collaborator

@pelesh pelesh left a comment

Choose a reason for hiding this comment

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

There are minor issues that @cameronrutherford and I pointed out that can be easily addressed. As soon as these are done, this PR can be merged.

In a more general context, I have mixed feelings about this PR. It essentially duplicates the capability that already exists in RAJA modules and therefore eliminates RAJA/Umpire as HiOp dependencies. On the other hand, it adds a couple of thousands lines of code more, only for CUDA capability. You would have to replicate the same for HIP and oneAPI, only to replace the RAJA dependency. I don't think this path is sustainable, but this is just my opinion. In any case, we have a real-life experiment to asses the value of portability libraries :).

set_match_pattern_cu<<<num_blocks,block_size>>>(n_local, yd, xd, id);
}

/** @brief Adjusts duals. */
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it i helpful to have brief description of each function next to the source code and the long one in the header files. Doxygen can merge them.

src/LinAlg/VectorCudaKernels.cu Outdated Show resolved Hide resolved
src/LinAlg/VectorCudaKernels.cu Outdated Show resolved Hide resolved
src/LinAlg/hiopVector.hpp Show resolved Hide resolved
src/LinAlg/hiopVectorCuda.cpp Outdated Show resolved Hide resolved
src/LinAlg/hiopVectorCuda.cpp Outdated Show resolved Hide resolved
src/LinAlg/hiopVectorCuda.cpp Outdated Show resolved Hide resolved
src/LinAlg/hiopVectorCuda.hpp Outdated Show resolved Hide resolved
Comment on lines +49 to +50
* @file hiopVectorIntCuda.cpp
*
Copy link
Collaborator

Choose a reason for hiding this comment

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

This file should probably have extension *.cu, to emphasize it can be compiled with CUDA only.

@cnpetra cnpetra merged commit 1c1e23f into develop Dec 13, 2022
@cnpetra cnpetra deleted the cuda-vector-dev branch June 30, 2023 04:49
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