Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
rocm_bandwidth_test
Commits
19b2c697
Commit
19b2c697
authored
Dec 04, 2017
by
Ramesh Errabolu
Browse files
Initial changes to add packaging code
parent
524a7dd9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
159 additions
and
0 deletions
+159
-0
DEBIAN/control
DEBIAN/control
+8
-0
RPM/rocm_bandwidth_test.spc
RPM/rocm_bandwidth_test.spc
+35
-0
cmake_modules/utils.cmake
cmake_modules/utils.cmake
+116
-0
No files found.
DEBIAN/control
0 → 100644
View file @
19b2c697
Package: rocm_bandwidth_test
Architecture: $arch
Maintainer: Advanced Micro Devices Inc.
Depends:
Priority: optional
Version: $version
Description: Test to measure PciE bandwidth on ROCm platform
RPM/rocm_bandwidth_test.spc
0 → 100644
View file @
19b2c697
%define name rocm_bandwidth_test
%define version %{getenv:PACKAGE_VER}
%define packageroot %{getenv:PACKAGE_DIR}
Name: %{name}
Version: %{version}
Release: 1
Summary: Test to measure PciE bandwith on ROCm platform
Group: System Environment/Libraries
License: Advanced Micro Devices Inc.
%description
This package includes rocm_bandwidth_test, a test that could be
used to measure PciE bandwidth on ROCm platform
%prep
%setup -T -D -c -n %{name}
%install
cp -R %packageroot $RPM_BUILD_ROOT
find $RPM_BUILD_ROOT \! -type d | sed "s|$RPM_BUILD_ROOT||"> test.list
%post
ldconfig
%postun
ldconfig
%clean
rm -rf $RPM_BUILD_ROOT
%files -f test.list
%defattr(-,root,root,-)
cmake_modules/utils.cmake
0 → 100644
View file @
19b2c697
################################################################################
##
## The University of Illinois/NCSA
## Open Source License (NCSA)
##
## Copyright (c) 2014-2017, Advanced Micro Devices, Inc. All rights reserved.
##
## Developed by:
##
## AMD Research and AMD HSA Software Development
##
## Advanced Micro Devices, Inc.
##
## www.amd.com
##
## Permission is hereby granted, free of charge, to any person obtaining a copy
## of this software and associated documentation files (the "Software"), to
## deal with the Software without restriction, including without limitation
## the rights to use, copy, modify, merge, publish, distribute, sublicense,
## and#or sell copies of the Software, and to permit persons to whom the
## Software is furnished to do so, subject to the following conditions:
##
## - Redistributions of source code must retain the above copyright notice,
## this list of conditions and the following disclaimers.
## - Redistributions in binary form must reproduce the above copyright
## notice, this list of conditions and the following disclaimers in
## the documentation and#or other materials provided with the distribution.
## - Neither the names of Advanced Micro Devices, Inc,
## nor the names of its contributors may be used to endorse or promote
## products derived from this Software without specific prior written
## permission.
##
## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
## THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
## OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
## ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
## DEALINGS WITH THE SOFTWARE.
##
################################################################################
## Parses the VERSION_STRING variable and places
## the first, second and third number values in
## the major, minor and patch variables.
function
(
parse_version VERSION_STRING
)
string
(
FIND
${
VERSION_STRING
}
"-"
STRING_INDEX
)
if
(
${
STRING_INDEX
}
GREATER -1
)
math
(
EXPR STRING_INDEX
"
${
STRING_INDEX
}
+ 1"
)
string
(
SUBSTRING
${
VERSION_STRING
}
${
STRING_INDEX
}
-1 VERSION_BUILD
)
endif
()
string
(
REGEX MATCHALL
"[0123456789]+"
VERSIONS
${
VERSION_STRING
}
)
list
(
LENGTH VERSIONS VERSION_COUNT
)
if
(
${
VERSION_COUNT
}
GREATER 0
)
list
(
GET VERSIONS 0 MAJOR
)
set
(
VERSION_MAJOR
${
MAJOR
}
PARENT_SCOPE
)
set
(
TEMP_VERSION_STRING
"
${
MAJOR
}
"
)
endif
()
if
(
${
VERSION_COUNT
}
GREATER 1
)
list
(
GET VERSIONS 1 MINOR
)
set
(
VERSION_MINOR
${
MINOR
}
PARENT_SCOPE
)
set
(
TEMP_VERSION_STRING
"
${
TEMP_VERSION_STRING
}
.
${
MINOR
}
"
)
endif
()
if
(
${
VERSION_COUNT
}
GREATER 2
)
list
(
GET VERSIONS 2 PATCH
)
set
(
VERSION_PATCH
${
PATCH
}
PARENT_SCOPE
)
set
(
TEMP_VERSION_STRING
"
${
TEMP_VERSION_STRING
}
.
${
PATCH
}
"
)
endif
()
if
(
DEFINED VERSION_BUILD
)
set
(
VERSION_BUILD
"
${
VERSION_BUILD
}
"
PARENT_SCOPE
)
endif
()
set
(
VERSION_STRING
"
${
TEMP_VERSION_STRING
}
"
PARENT_SCOPE
)
endfunction
()
## Gets the current version of the repository
## using versioning tags and git describe.
## Passes back a packaging version string
## and a library version string.
function
(
get_version DEFAULT_VERSION_STRING
)
parse_version
(
${
DEFAULT_VERSION_STRING
}
)
find_program
(
GIT NAMES git
)
if
(
GIT
)
execute_process
(
COMMAND git describe --dirty --long --match [0-9]*
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
OUTPUT_VARIABLE GIT_TAG_STRING
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE RESULT
)
if
(
${
RESULT
}
EQUAL 0
)
parse_version
(
${
GIT_TAG_STRING
}
)
endif
()
endif
()
set
(
VERSION_STRING
"
${
VERSION_STRING
}
"
PARENT_SCOPE
)
set
(
VERSION_MAJOR
"
${
VERSION_MAJOR
}
"
PARENT_SCOPE
)
set
(
VERSION_MINOR
"
${
VERSION_MINOR
}
"
PARENT_SCOPE
)
set
(
VERSION_PATCH
"
${
VERSION_PATCH
}
"
PARENT_SCOPE
)
set
(
VERSION_BUILD
"
${
VERSION_BUILD
}
"
PARENT_SCOPE
)
endfunction
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment