-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from LLNL/release/0.3.0
Release version 0.3.0
- Loading branch information
Showing
118 changed files
with
4,326 additions
and
839 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule blt
updated
40 files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
////////////////////////////////////////////////////////////////////////////// | ||
// Copyright (c) 2018, Lawrence Livermore National Security, LLC. | ||
// Produced at the Lawrence Livermore National Laboratory | ||
// | ||
// Created by David Beckingsale, [email protected] | ||
// LLNL-CODE-747640 | ||
// | ||
// All rights reserved. | ||
// | ||
// This file is part of Umpire. | ||
// | ||
// For details, see https://github.com/LLNL/Umpire | ||
// Please also see the LICENSE file for MIT license. | ||
////////////////////////////////////////////////////////////////////////////// | ||
#include <iostream> | ||
|
||
#include "umpire/ResourceManager.hpp" | ||
|
||
#include "umpire/strategy/SizeLimiter.hpp" | ||
#include "umpire/strategy/DynamicPool.hpp" | ||
|
||
#include "umpire/util/Macros.hpp" | ||
|
||
int main(int, char**) | ||
{ | ||
auto& rm = umpire::ResourceManager::getInstance(); | ||
auto size_limited_alloc = rm.makeAllocator<umpire::strategy::SizeLimiter>( | ||
"size_limited_alloc", rm.getAllocator("HOST"), 1024); | ||
|
||
auto pool = rm.makeAllocator<umpire::strategy::DynamicPool>( | ||
"pool", size_limited_alloc, 64, 64); | ||
|
||
// This will throw an exception because the pool is limited to 1024 bytes. | ||
void* data = pool.allocate(2048); | ||
UMPIRE_USE_VAR(data); | ||
|
||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#cmake \ | ||
# -DCMAKE_BUILD_TYPE=Release \ | ||
# -DENABLE_ROCM=ON -DBLT_SOURCE_DIR=${BLT_DIR} \ | ||
# -DROCM_ARCH=gfx900 \ | ||
# -C ${BLT_DIR}/cmake/blt-test/host-configs/rocm.cmake \ | ||
# -DCMAKE_INSTALL_PREFIX=../install-rocm-release \ | ||
|
||
|
||
set(ENABLE_ROCM ON CACHE BOOL "") | ||
set(ENABLE_OPENMP OFF CACHE BOOL "") | ||
set(ENABLE_CUDA Off CACHE BOOL "") | ||
set(ENABLE_GMOCK Off CACHE BOOL "") | ||
|
||
set(ROCM_ROOT_DIR "/opt/rocm/" CACHE PATH "ROCm ROOT directory path") | ||
|
||
set(ROCM_INCLUDE_PATH "${ROCM_ROOT_DIR}/hcc/include" CACHE PATH "") | ||
set(ROCM_CXX_LIBRARIES "-L${ROCM_ROOT_DIR}/hcc/lib -lhc_am" CACHE STRING "") | ||
|
||
set(ROCM_ARCH "gfx900" CACHE STRING "") | ||
|
||
########################################################### | ||
# specify the target architecture | ||
# Default with ROCm 1.7 is gfx803 (Fiji) | ||
# Other options: | ||
# gfx700 Hawaii | ||
# gfx803 Polaris (RX580) | ||
# gfx900 Vega | ||
# gfx901 | ||
########################################################### | ||
set(ROCM_ARCH_FLAG "-amdgpu-target=${ROCM_ARCH}" CACHE STRING "") | ||
|
||
########################################################### | ||
# get compile/link flags from hcc-config | ||
########################################################### | ||
execute_process(COMMAND ${ROCM_ROOT_DIR}/hcc/bin/hcc-config --cxxflags OUTPUT_VARIABLE ROCM_CXX_COMPILE_FLAGS) | ||
execute_process(COMMAND ${ROCM_ROOT_DIR}/hcc/bin/hcc-config --ldflags OUTPUT_VARIABLE ROCM_CXX_LINK_FLAGS) | ||
|
||
#set(ROCM_CXX_COMPILE_FLAGS "${ROCM_CXX_COMPILE_FLAGS} -Wno-unused-command-line-argument -DHCC_ENABLE_ACCELERATOR_PRINTF" CACHE STRING "") | ||
set(ROCM_CXX_LINK_FLAGS "${ROCM_CXX_LINK_FLAGS} ${ROCM_ARCH_FLAG} ${ROCM_CXX_LIBRARIES}" CACHE STRING "") | ||
|
||
########################################################### | ||
# set CMake cache variables | ||
########################################################### | ||
set(CMAKE_CXX_COMPILER "${ROCM_ROOT_DIR}/bin/hcc" CACHE FILEPATH "ROCm HCC compiler") | ||
set(BLT_CXX_FLAGS "${ROCM_CXX_COMPILE_FLAGS}" CACHE STRING "HCC compiler flags") | ||
set(BLT_EXE_LINKER_FLAGS ${ROCM_CXX_LINK_FLAGS} CACHE STRING "") | ||
|
||
#set(CMAKE_CXX_LINK_EXECUTABLE "${CMAKE_CXX_COMPILER} ${ROCM_CXX_LINK_FLAGS} <OBJECTS> <LINK_LIBRARIES> -o <TARGET>" CACHE STRING "HCC linker command line") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.