Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: |
sudo apt-get update
sudo apt install clang-20 llvm-dev libjansson-dev libssl-dev bison flex make cmake mpich pybind11-dev
clang++ --version
clang++-20 --version

- name: Clone Caliper
uses: actions/checkout@v2
Expand All @@ -84,7 +84,7 @@ jobs:
cd src/c
mkdir build install
cd build
export CMAKE_OPTS="-DCMAKE_CXX_COMPILER=clang++ -DLLVM_DIR=/usr/lib/llvm-18/cmake -DCMAKE_INSTALL_PREFIX=../install"
export CMAKE_OPTS="-DCMAKE_CXX_COMPILER=clang++-20 -DLLVM_DIR=/usr/lib/llvm-20/cmake -DCMAKE_INSTALL_PREFIX=../install"
export CMAKE_OPTS="${CMAKE_OPTS} -DCMAKE_BUILD_TYPE=${{matrix.CMAKE_BUILD_TYPE}}"
export CMAKE_OPTS="${CMAKE_OPTS} -DPERFFLOWASPECT_WITH_CUDA=${{matrix.PERFFLOWASPECT_WITH_CUDA}}"
export CMAKE_OPTS="${CMAKE_OPTS} -DPERFFLOWASPECT_WITH_MPI=${{matrix.PERFFLOWASPECT_WITH_MPI}}"
Expand Down
8 changes: 4 additions & 4 deletions src/c/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ project(PerfFlowAspect VERSION "0.1.0")
# Higher-level build options.
option(PERFFLOWASPECT_WITH_CALIPER "Build with Caliper support" OFF)

# Fail if using Clang < 18.0
# Fail if using Clang < 20.0
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0)
message(FATAL_ERROR "Clang++ version must be equal to 18.0!")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 20.0)
message(FATAL_ERROR "Clang++ version must be equal to 20.0!")
endif()
else()
message(FATAL_ERROR "Unsupported CXX compiler: please use Clang == 18.0")
message(FATAL_ERROR "Unsupported CXX compiler: please use Clang == 20.0")
endif()

include(cmake/CMakeBasics.cmake)
Expand Down
19 changes: 19 additions & 0 deletions src/c/host-configs/tuo-main.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
##############################################################
# Copyright 2021 Lawrence Livermore National Security, LLC
# (c.f. AUTHORS, NOTICE.LLNS, COPYING)
#
# This file is part of the Flux resource manager framework.
# For details, see https://github.com/flux-framework.
#
# SPDX-License-Identifier: LGPL-3.0
##############################################################

set(CMAKE_C_COMPILER "/opt/rocm-7.0.0/lib/llvm/bin/amdclang" CACHE PATH "")
set(CMAKE_CXX_COMPILER "/opt/rocm-7.0.0/lib/llvm/bin/amdclang++" CACHE PATH "")

set(PERFFLOWASPECT_WITH_CUDA "OFF" CACHE BOOL "")

# To enable fine-grained profiling with Caliper, utilize the below options.
# Caliper should be built with the same compilers as the PerfFlowAspect.
# set(PERFFLOWASPECT_WITH_CALIPER ON CACHE BOOL "")
# set(caliper_DIR "path-to-caliper-install-directory" CACHE PATH "")
22 changes: 11 additions & 11 deletions src/c/weaver/weave/perfflow_weave_common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,11 @@ bool weave_ns::WeaveCommon::insertAfter(Module &m, Function &f, StringRef &a,

if (valid) {
IRBuilder<> builder(inst);
Value *v1 = builder.CreateGlobalStringPtr(m.getName(), "str");
Value *v2 = builder.CreateGlobalStringPtr(f.getName(), "str");
Value *v3 = builder.CreateGlobalStringPtr(StringRef(scope), "str");
Value *v4 = builder.CreateGlobalStringPtr(StringRef(flow), "str");
Value *v5 = builder.CreateGlobalStringPtr(StringRef(pcut), "str");
Value *v1 = builder.CreateGlobalString(m.getName(), "str");
Value *v2 = builder.CreateGlobalString(f.getName(), "str");
Value *v3 = builder.CreateGlobalString(StringRef(scope), "str");
Value *v4 = builder.CreateGlobalString(StringRef(flow), "str");
Value *v5 = builder.CreateGlobalString(StringRef(pcut), "str");
std::vector<Value *> args;
args.push_back(ConstantInt::get(Type::getInt32Ty(context), async));
args.push_back(v1);
Expand Down Expand Up @@ -216,11 +216,11 @@ bool weave_ns::WeaveCommon::insertBefore(Module &m, Function &f, StringRef &a,
// weaveFuncTy);
auto &entry = f.getEntryBlock();
IRBuilder<> builder(&entry);
Value *v1 = builder.CreateGlobalStringPtr(m.getName(), "str");
Value *v2 = builder.CreateGlobalStringPtr(f.getName(), "str");
Value *v3 = builder.CreateGlobalStringPtr(StringRef(scope), "str");
Value *v4 = builder.CreateGlobalStringPtr(StringRef(flow), "str");
Value *v5 = builder.CreateGlobalStringPtr(StringRef(pcut), "str");
Value *v1 = builder.CreateGlobalString(m.getName(), "str");
Value *v2 = builder.CreateGlobalString(f.getName(), "str");
Value *v3 = builder.CreateGlobalString(StringRef(scope), "str");
Value *v4 = builder.CreateGlobalString(StringRef(flow), "str");
Value *v5 = builder.CreateGlobalString(StringRef(pcut), "str");
builder.SetInsertPoint(&entry, entry.begin());
std::vector<Value *> args;
args.push_back(ConstantInt::get(Type::getInt32Ty(context), async));
Expand All @@ -243,7 +243,7 @@ bool weave_ns::WeaveCommon::instrumentCaliper(Module &M, Function &F)

IRB.SetInsertPoint(Entry.getTerminator());
std::string FunctionName = F.getName().str();
auto *FnStr = IRB.CreateGlobalStringPtr(FunctionName);
auto *FnStr = IRB.CreateGlobalString(FunctionName);
IRB.CreateCall(CaliBeginRegion, {FnStr});

bool RetFound = false;
Expand Down
3 changes: 1 addition & 2 deletions src/c/weaver/weave/perfflow_weave_new_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,9 @@ PassPluginLibraryInfo getNewWeavingPassPluginInfo()
const auto pass_callback = [](PassBuilder & PB)
{
PB.registerPipelineEarlySimplificationEPCallback(
[&](ModulePassManager & MPM, auto)
[&](ModulePassManager & MPM, OptimizationLevel OL, ThinOrFullLTOPhase TOFLTOP)
{
MPM.addPass(NewWeavingPass());
return true;
}
);
};
Expand Down