Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.

Commit

Permalink
merge amd-stg-open into amd-mainline-open
Browse files Browse the repository at this point in the history
Change-Id: Ib9491ebc1df677a45c1edb6c870eb76f2ce8f350
  • Loading branch information
searlmc1 committed Jan 18, 2022
2 parents d8171e7 + ff17b35 commit 62809a5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
set ( CPACK_PACKAGE_CONTACT "Advanced Micro Devices Inc." )
set ( CPACK_PACKAGE_DESCRIPTION_SUMMARY "Radeon Open Compute - device libraries" )
set ( CPACK_PACKAGE_DESCRIPTION "This package includes LLVM bitcode libraries." )
set ( CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.TXT" )
set ( CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/RadeonOpenCompute/ROCm-Device-Libs" )

# Install License file
install ( FILES "${CPACK_RESOURCE_FILE_LICENSE}"
DESTINATION ${CMAKE_INSTALL_DOCDIR}/${CPACK_PACKAGE_NAME})

set ( CPACK_GENERATOR "DEB;RPM" CACHE STRING "Default packaging generators." )

## ROCM version updates as per naming convention
Expand All @@ -107,6 +112,7 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
endif()
## get distro for RPM package using dist
message("device-libs CPACK_RPM_PACKAGE_RELEASE now is ${CPACK_RPM_PACKAGE_RELEASE}")
set( CPACK_RPM_PACKAGE_LICENSE "NCSA" )

execute_process( COMMAND rpm --eval %{?dist}
RESULT_VARIABLE _result_var
Expand Down
File renamed without changes.
48 changes: 48 additions & 0 deletions opencl/src/misc/amdblit.cl
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,54 @@ __amd_fillBufferAligned(
}
}

__attribute__((always_inline)) void
__amd_fillBufferAligned2D(__global uchar* bufUChar,
__global ushort* bufUShort,
__global uint* bufUInt,
__global ulong* bufULong,
__constant uchar* pattern,
uint patternSize,
ulong origin,
ulong width,
ulong height,
ulong pitch)
{
ulong tid_x = get_global_id(0);
ulong tid_y = get_global_id(1);

if (tid_x >= width || tid_y >= height) {
return;
}

ulong offset = (tid_y * pitch + tid_x);

if (bufULong) {
__global ulong* element = &bufULong[origin + offset];
__constant ulong* pt = (__constant ulong*)pattern;
for (uint i = 0; i < patternSize; ++i) {
element[i] = pt[i];
}
} else if (bufUInt) {
__global uint* element = &bufUInt[origin + offset];
__constant uint* pt = (__constant uint*)pattern;
for (uint i = 0; i < patternSize; ++i) {
element[i] = pt[i];
}
} else if (bufUShort) {
__global ushort* element = &bufUShort[origin + offset];
__constant ushort* pt = (__constant ushort*)pattern;
for (uint i = 0; i < patternSize; ++i) {
element[i] = pt[i];
}
} else if (bufUChar) {
__global uchar* element = &bufUChar[origin + offset];
__constant uchar* pt = (__constant uchar*)pattern;
for (uint i = 0; i < patternSize; ++i) {
element[i] = pt[i];
}
}
}

__attribute__((always_inline)) void
__amd_fillImage(
__write_only image2d_array_t image,
Expand Down

0 comments on commit 62809a5

Please sign in to comment.