Skip to content

Commit

Permalink
make compile and run on Lumi
Browse files Browse the repository at this point in the history
  • Loading branch information
sbrdar committed Oct 14, 2024
1 parent e9d6e5d commit 9bacfe5
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 14 deletions.
20 changes: 10 additions & 10 deletions hic/src/hic/hic_runtime.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
#include <cuda_runtime.h>
#elif HIC_BACKEND_HIP
#define HIC_BACKEND hip
#if defined(DEPRECATED)
#define DEFINED_OUTERSCOPE DEPRECATED
#undef DEPRECATED
#endif
//#if defined(DEPRECATED)
// #define DEFINED_OUTERSCOPE DEPRECATED
// #undef DEPRECATED
// #endif
#include <hip/hip_runtime.h>
#if defined(DEPRECATED)
#undef DEPRECATED
#endif
#if defined(DEFINED_OUTERSCOPE)
#define DEPRECATED DEFINED_OUTERSCOPE
#endif
// #if defined(DEPRECATED)
// #undef DEPRECATED
// #endif
// #if defined(DEFINED_OUTERSCOPE)
// #define DEPRECATED DEFINED_OUTERSCOPE
// #endif

#if HIP_VERSION_MAJOR < 6
enum hicMemoryType {
Expand Down
3 changes: 3 additions & 0 deletions pluto/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ function( add_example target )
target_host_device_sources( ${target} PRIVATE ${_PAR_UNPARSED_ARGUMENTS})
target_link_libraries( ${target} PRIVATE pluto )
target_include_directories( ${target} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
if (ENABLE_HIP)
set_target_properties(${target} PROPERTIES LINKER_LANGUAGE HIP)
endif()
endfunction()

add_example(is_on_device is_on_device.cc)
Expand Down
6 changes: 3 additions & 3 deletions pluto/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# does it submit to any jurisdiction.


pluto_host_device( pluto_host_device_src SOURCE pluto/device/MemoryResource.cc)
#pluto_host_device( pluto_host_device_src SOURCE pluto/device/MemoryResource.cc)

set(PLUTO_HAVE_CUDA ${HAVE_CUDA} )
set(PLUTO_HAVE_HIP ${HAVE_HIP} )
Expand All @@ -26,8 +26,8 @@ install( FILES

ecbuild_add_library( TARGET pluto
SOURCES
${pluto_host_device_src}

#!${pluto_host_device_src}
pluto/device/MemoryResource.cc
pluto/device/allocator.h
pluto/device/make_copy.h
pluto/device/MemoryResource.h
Expand Down
2 changes: 1 addition & 1 deletion pluto/src/pluto/memory_resource/memory_resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using pool_options = STD_PMR::pool_options;
inline memory_resource* null_memory_resource() { return STD_PMR::null_memory_resource(); }
inline memory_resource* new_delete_resource() { return STD_PMR::new_delete_resource(); }
inline memory_resource* get_default_resource() {
init();
//init();
return STD_PMR::get_default_resource(); }
inline void set_default_resource(memory_resource* mr) { STD_PMR::set_default_resource(mr); }

Expand Down
3 changes: 3 additions & 0 deletions pluto/tests/sandbox/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ function( add_sandbox target )
target_host_device_sources( ${target} PRIVATE ${_PAR_UNPARSED_ARGUMENTS})
target_link_libraries( ${target} PRIVATE pluto )
target_include_directories( ${target} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} )
if( ENABLE_HIP )
set_target_properties(${target} PROPERTIES LINKER_LANGUAGE HIP )
endif()
endfunction()

add_sandbox(pluto-sandbox sandbox.cc kernel.cc)

0 comments on commit 9bacfe5

Please sign in to comment.