Skip to content

Commit b9e664d

Browse files
authored
Merge pull request #26 from GPUOpen-LibrariesAndSDKs/next-release-4
Update to 2.5.8c74270
2 parents b9d4a52 + 614b0ce commit b9e664d

28 files changed

+1145
-675
lines changed

CMakeLists.txt

+2-10
Original file line numberDiff line numberDiff line change
@@ -365,14 +365,14 @@ endif()
365365
if(PRECOMPILE)
366366
message(">> Execute: ${PYTHON_EXECUTABLE} compile.py --nvidia --hipSdkPath \"${HIP_FINAL_PATH}\"")
367367
execute_process(
368-
COMMAND ${PYTHON_EXECUTABLE} compile.py --nvidia --hipSdkPath \"${HIP_FINAL_PATH}\"
368+
COMMAND ${PYTHON_EXECUTABLE} compile.py --nvidia --hipSdkPath ${HIP_FINAL_PATH}
369369
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/bitcodes
370370
)
371371

372372
if(NOT NO_UNITTEST)
373373
message(">> Execute: ${PYTHON_EXECUTABLE} precompile_bitcode.py --nvidia --hipSdkPath \"${HIP_FINAL_PATH}\"")
374374
execute_process(
375-
COMMAND ${PYTHON_EXECUTABLE} precompile_bitcode.py --nvidia --hipSdkPath \"${HIP_FINAL_PATH}\"
375+
COMMAND ${PYTHON_EXECUTABLE} precompile_bitcode.py --nvidia --hipSdkPath ${HIP_FINAL_PATH}
376376
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts/bitcodes
377377
)
378378
endif()
@@ -411,19 +411,11 @@ endif()
411411
if(BAKE_KERNEL OR GENERATE_BAKE_KERNEL)
412412
message(">> BakeKernel Executed")
413413
if(WIN32)
414-
execute_process(
415-
COMMAND mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/hiprt/cache
416-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
417-
)
418414
execute_process(
419415
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/bakeKernel.bat
420416
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
421417
)
422418
else()
423-
execute_process(
424-
COMMAND mkdir -p ${CMAKE_CURRENT_SOURCE_DIR}/hiprt/cache
425-
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
426-
)
427419
execute_process(
428420
COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/tools/bakeKernel.sh
429421
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

contrib/Orochi/Orochi/GpuMemory.h

+12-12
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
namespace Oro
2929
{
3030

31-
/// @brief A helper function that casts an address of a pointer to the device memory to a void pointer to be used as an argument for kernel calls.
31+
/// @brief A helper function that casts an address of a pointer to the device memory to a void pointer to be used as an argument for kernel calls.
3232
/// @tparam T The type of the element stored in the device memory.
3333
/// @param ptr The address of a pointer to the device memory.
3434
/// @return A void pointer.
@@ -44,8 +44,8 @@ class GpuMemory final
4444
public:
4545
GpuMemory() = default;
4646

47-
/// @brief Allocate the device memory with the given size.
48-
/// @param init_size The initial size which represents the number of elements.
47+
/// @brief Allocate the elements on the device memory.
48+
/// @param init_size The initial container size which represents the number of elements.
4949
explicit GpuMemory( const size_t init_size )
5050
{
5151
OrochiUtils::malloc( m_data, init_size );
@@ -61,9 +61,9 @@ class GpuMemory final
6161

6262
GpuMemory& operator=( GpuMemory&& other ) noexcept
6363
{
64-
GpuMemory tmp( std::move( *this ) );
64+
GpuMemory tmp( std::move( other ) );
6565

66-
swap( *this, other );
66+
swap( *this, tmp );
6767

6868
return *this;
6969
}
@@ -79,8 +79,8 @@ class GpuMemory final
7979
m_capacity = 0ULL;
8080
}
8181

82-
/// @brief Get the size of the device memory.
83-
/// @return The size of the device memory.
82+
/// @brief Get the container size which represents the number of elements.
83+
/// @return The container size which represents the number of elements.
8484
size_t size() const noexcept { return m_size; }
8585

8686
/// @brief Get the pointer to the device memory.
@@ -91,9 +91,9 @@ class GpuMemory final
9191
/// @return The address of the pointer to the device memory.
9292
T* const* address() const noexcept { return &m_data; }
9393

94-
/// @brief Resize the device memory. Its capacity is unchanged if the new size is smaller than the current one.
94+
/// @brief Resize the container. Its capacity is unchanged if the new size is smaller than the current one.
9595
/// The old data should be considered invalid to be used after the function is called unless @c copy is set to True.
96-
/// @param new_size The new memory size after the function is called.
96+
/// @param new_size The new container size which represents the number of elements after the function is called.
9797
/// @param copy If true, the function will copy the data to the newly created memory space as well.
9898
void resize( const size_t new_size, const bool copy = false ) noexcept
9999
{
@@ -113,8 +113,8 @@ class GpuMemory final
113113
*this = std::move( tmp );
114114
}
115115

116-
/// @brief Asynchronous version of 'resize' using a given Orochi stream.
117-
/// @param new_size The new memory size after the function is called.
116+
/// @brief Asynchronous version of @c resize using a given Orochi stream.
117+
/// @param new_size The new container size which represents the number of elements after the function is called.
118118
/// @param copy If true, the function will copy the data to the newly created memory space as well.
119119
/// @param stream The Orochi stream used for the underlying operations.
120120
void resizeAsync( const size_t new_size, const bool copy = false, oroStream stream = 0 ) noexcept
@@ -138,7 +138,7 @@ class GpuMemory final
138138
/// @brief Reset the memory space so that all bits inside are cleared to zero.
139139
void reset() noexcept { OrochiUtils::memset( m_data, 0, m_size * sizeof( T ) ); }
140140

141-
/// @brief Asynchronous version of 'reset' using a given Orochi stream.
141+
/// @brief Asynchronous version of @c reset using a given Orochi stream.
142142
/// @param stream The Orochi stream used for the underlying operations.
143143
void resetAsync( oroStream stream = 0 ) noexcept { OrochiUtils::memsetAsync( m_data, 0, m_size * sizeof( T ), stream ); }
144144

0 commit comments

Comments
 (0)