Skip to content

Commit

Permalink
checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob-Chen222 committed Jun 22, 2024
1 parent d13862b commit c34fb69
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .flake/pkgs/legion.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ stdenv.mkDerivation rec {
(cmakeFeature "HIP_THRUST_ROOT_DIR" "${rocmPackages.rocthrust}")
(cmakeFeature "ROCM_PATH" "${rocmPackages.clr}")

(cmakeFeature "HIP_INCLUDE_DIRS" "${rocmPackages.clr}/hip/include")

(cmakeFeature "CMAKE_CXX_COMPILER" "hipcc")
(cmakeFeature "CMAKE_C_COMPILER" "hipcc")
]
Expand Down
15 changes: 9 additions & 6 deletions .proj.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,30 @@ fix_compile_commands = false

build_targets = [
"kernels",
"pcg",
# "pcg",
# "substitutions",
# "compiler",
"substitution-generator",
"local-execution",
# "substitution-generator",
# "local-execution",
]
test_targets = [
# "utils-tests",
# "substitutions-tests",
# "compiler-tests",
"pcg",
# "pcg",
# "substitutions",
# "compiler",
"substitution-generator",
# "substitution-generator",
]

[cmake_flags_extra]
FF_USE_HIP_ROCM = "ON"
FF_GPU_BACKEND = "hip_rocm"
CMAKE_CUDA_ARCHITECTURES = "60"
# CMAKE_CUDA_ARCHITECTURES = "60"
CMAKE_HIP_ARCHITECTURES = "gfx900"
# HIP_PLATFORM = "amd"
# HIP_RUNTIME = "rocclr"
CMAKE_CXX_COMPILER = "hipcc"
CMAKE_C_COMPILER = "hipcc"

# FF_CUDA_ARCH = "60"
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ include(doctestlib) # named doctestlib to avoid a name collision with doctest.cm
include(visit_struct)
include(CTest)
include(fmt)
# include(legion)
include(legion)
include(rapidcheck)
#include(gtest)

Expand Down
52 changes: 34 additions & 18 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
};
lib = pkgs.lib;

inherit (pkgs.rocmPackages) clr miopen miopengemm rccl rocm-runtime;

rocm = pkgs.symlinkJoin {
name = "rocm";
paths = with pkgs.rocmPackages; [
Expand All @@ -46,12 +48,13 @@
clr
hipcc
rccl
llvm.clang
miopen
miopengemm
miopen-hip
hipblas
rocm-cmake
clr
hip-common
];
};

Expand Down Expand Up @@ -84,7 +87,13 @@
devShells = rec {
ci = mkShell {
shellHook = ''
export HIP_COMPILER="${pkgs.rocmPackages.llvm.clang}/bin/clang"
export PATH="$HOME/ff/.scripts/:$PATH"
export ROCM_PATH=${clr}
export HIP_DEVICE_LIB_PATH="${pkgs.rocmPackages.rocm-device-libs}/amdgcn/bitcode"
# export HIP_ROOT_DIR=${clr}
# export HIP_PATH=${clr}/hip
# export HIP_INCLUDE_DIRS=${clr}/hip/include
echo "ROCm path set to: $ROCM_PATH"
'';

Expand All @@ -100,6 +109,14 @@
"-DFF_USE_EXTERNAL_RANGEV3=ON"
"-DFF_USE_EXTERNAL_BOOST_PREPROCESSOR=ON"
"-DFF_USE_EXTERNAL_TYPE_INDEX=ON"

# hip related flags
"-DHIP_PLATFORM=amd"
# "-DHIP_RUNTIME=rocclr"
# "-DHIP_COMPILER=${pkgs.rocmPackages.llvm.clang}/bin/clang"
"-DHIP_PATH=${clr}/hip"
"-DHIP_ROOT_DIR=${clr}/hip"

];

RC_PARAMS = "max_discard_ratio=100";
Expand All @@ -116,12 +133,6 @@
ccache
pkg-config
python3
# cudatoolkit
# cudaPackages.cuda_nvcc
# cudaPackages.cudnn
# cudaPackages.nccl
# cudaPackages.libcublas
# cudaPackages.cuda_cudart
tl-expected
])
(with self.packages.${system}; [
Expand All @@ -130,16 +141,21 @@
rapidcheckFull
doctest
])
[ rocm ]
# (with pkgs.rocmPackages; [
# hipcc
# rccl
# miopen
# miopen-hip
# hipblas
# rocm-cmake
# clr
# ])
(with pkgs.rocmPackages; [
clr
miopen
miopengemm
rccl
rocm-runtime
hipblas
hipcc
hip-common
rocm-cmake
miopen-hip
rocm-thunk
rocm-device-libs
])
# [ rocm ]
];
};

Expand Down Expand Up @@ -184,4 +200,4 @@
};
}
);
}
}

0 comments on commit c34fb69

Please sign in to comment.