Skip to content

Commit 2cb26b9

Browse files
doru1004ptcherni
authored andcommitted
Change vector interleaving to 8 (#8)
1 parent 2e2b43b commit 2cb26b9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

quadrants/runtime/amdgpu/jit_amdgpu.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
#include "llvm/IR/Module.h"
66
#include "llvm/Transforms/Utils/Cloning.h"
7+
#include "llvm/Transforms/Scalar/LoopStrengthReduce.h"
8+
#include "llvm/Transforms/Scalar/EarlyCSE.h"
9+
#include "llvm/Transforms/Scalar/SeparateConstOffsetFromGEP.h"
10+
#include "llvm/Transforms/Utils.h"
11+
#include "llvm/Support/CommandLine.h"
712

813
#include <fstream>
914
#include <cstdlib>
@@ -24,6 +29,12 @@ JITModule *JITSessionAMDGPU ::add_module(std::unique_ptr<llvm::Module> M, int ma
2429
}
2530

2631
std::string JITSessionAMDGPU::compile_module_to_hsaco(std::unique_ptr<llvm::Module> &llvm_module) {
32+
static std::once_flag amdgpu_cl_flags;
33+
std::call_once(amdgpu_cl_flags, [] {
34+
const char *args[] = {"quadrants", "-force-vector-interleave=8"};
35+
llvm::cl::ParseCommandLineOptions(2, args);
36+
});
37+
2738
llvm::legacy::FunctionPassManager function_pass_manager_addrcast(llvm_module.get());
2839
function_pass_manager_addrcast.add(new AMDGPUConvertAllocaInstAddressSpacePass());
2940
function_pass_manager_addrcast.doInitialization();

0 commit comments

Comments
 (0)