-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
15618 project #1558
Closed
+825
−277
Closed
15618 project #1558
Changes from 250 commits
Commits
Show all changes
337 commits
Select commit
Hold shift + click to select a range
f4c7d3a
sync
hugolatendresse 41cf635
sync
hugolatendresse 4121340
sync
hugolatendresse 7f6a18b
sync
hugolatendresse 3498538
I'm able to output with only one expert by commenting out groupby and…
hugolatendresse 344fe09
sync
hugolatendresse b9883c1
sync
hugolatendresse 65afc21
works without topk!
hugolatendresse 4d6886c
outputs tokens with softmax assertion not commented out
hugolatendresse e757567
sync
hugolatendresse d45edbc
sync
hugolatendresse 8c422aa
use full precisoin
hugolatendresse c0e4824
sync
hugolatendresse 1c13c1e
sync
hugolatendresse d31cbea
sync
hugolatendresse 8c525c4
sync
hugolatendresse 8b10df9
sync
hugolatendresse f8ea430
sync
hugolatendresse 54e6adc
sync
hugolatendresse e5075fa
sync
hugolatendresse fe8e7fd
sync
hugolatendresse dbe3be6
sync
hugolatendresse 0d2fa44
sync
hugolatendresse a0ad4c0
sync
hugolatendresse 5473f2c
sync
hugolatendresse 927356d
sync
hugolatendresse f7c6360
sync
hugolatendresse 88a7163
just run groupby
hugolatendresse 89f5a85
sync
hugolatendresse 0eeaab4
outputs tokens
hugolatendresse 17174d2
comments
hugolatendresse 99e6e31
Merge pull request #6 from flexflow/mixtral
hugolatendresse dca4703
all changes from my most recent branch except in mixtral.cc and aggre…
hugolatendresse 1375849
names
hugolatendresse afd49a0
non null points for aggregate_inputs
hugolatendresse d8a1b34
>=
hugolatendresse 41f8fea
added guid to groupby
hugolatendresse 26cbd49
layer_guid for aggregate
hugolatendresse 4f5ff4b
sync
hugolatendresse 5595e05
sync
hugolatendresse 4dbcdb1
compiles with layer_guid in aggregate and groupby, but getting unsupo…
hugolatendresse 37a56a3
added div op to some of the scripts
hugolatendresse d937c00
sync
hugolatendresse dcea4d6
sync
hugolatendresse 87039e6
sync
hugolatendresse 6e445ad
sync
hugolatendresse f3091f6
sync
hugolatendresse 894e10d
sync
hugolatendresse e12d5e2
sync
hugolatendresse c586ae8
sync
hugolatendresse 19ee4a6
sync
hugolatendresse 6175749
sync
hugolatendresse 32f2c7b
sync
hugolatendresse 8beedc8
sync
hugolatendresse 74692f6
sync
hugolatendresse 6f40ccf
sync
hugolatendresse c25fb1b
sync
hugolatendresse ef90e99
sync
hugolatendresse 0168374
switch to 128 and print old
hugolatendresse 1ec0401
ff_norm as placeholder, no groupby
hugolatendresse f27b979
CHECKPOINT
hugolatendresse 840d1e1
mlpout2
hugolatendresse 85d05c9
sync
hugolatendresse 1f9841c
sync
hugolatendresse 166aabd
dummy grouped tokens 2
hugolatendresse ecb5a96
try creating dummy to make sure we can create useless thigns
hugolatendresse 20be94a
unable to create wdumm1 and wdummy2! implies that we can't just recre…
hugolatendresse 16b7ee1
try to make dummy work
hugolatendresse 67c2dbb
sync
hugolatendresse 2997db4
sync
hugolatendresse 4533b9c
sync
hugolatendresse 96abed1
update: i AM able to create dummy extra tensros with ff.dense. Create…
hugolatendresse 78ae547
no dummy
hugolatendresse 37e1cb5
try mlp_out2
hugolatendresse 7d07a47
starting point before messing with aggregate to fix legion index spac…
hugolatendresse 68ac2aa
starting point before messing with aggregate to fix legion index spac…
hugolatendresse 3daf714
sync
hugolatendresse ea80e2e
sync
hugolatendresse d45167a
groupby works as part of piepline. tokens outputtedgit diff
hugolatendresse 83ca675
sync
hugolatendresse 52e40b1
sync
hugolatendresse a650304
sync
hugolatendresse 165750e
sync
hugolatendresse b17b44a
comments
hugolatendresse 51c3b5d
sync
hugolatendresse ce06918
todo
hugolatendresse ab82308
sync
hugolatendresse ed50b58
sync
hugolatendresse 9d33dbe
able to output tokens if I bypass both
hugolatendresse b096e8c
able to output tokens if I bypass both
hugolatendresse 9eea582
sync
hugolatendresse 22975bc
still outputting with no agg
hugolatendresse 25ef67c
sync
hugolatendresse 077905a
sync
hugolatendresse 443e563
able to output tokens with empty forward task for aggregate
hugolatendresse 731dd9f
sync
hugolatendresse 0c4c5be
space domain error occurs even without kernel call. The problem is so…
hugolatendresse 36b2eec
space domain error occurs even without kernel call. The problem is so…
hugolatendresse 94a62b6
still experiencing error with get index space domain
hugolatendresse b954777
sync
hugolatendresse 69e67ed
sync
hugolatendresse 121cc06
sync
hugolatendresse 262b85c
sync
hugolatendresse 36e64d3
sync
hugolatendresse 523294b
sync
hugolatendresse cddd7dd
printf in mha
hugolatendresse d03cc70
printf in mha
hugolatendresse 0ee07e3
sync
hugolatendresse 8a8ff96
able to output tokens. copied legion in init_inference, but no doing …
hugolatendresse 3d869a6
sync
hugolatendresse 78528a6
sync
hugolatendresse f38d6b4
sync
hugolatendresse 721ba9d
sync
hugolatendresse 24cd22b
sync
hugolatendresse dbcf1f3
sync
hugolatendresse c8826a5
now onto forward task
hugolatendresse 0ec62da
now onto forward task
hugolatendresse 68f8058
now onto forward task
hugolatendresse bbe639d
outputting tokens
hugolatendresse 6bd5d7e
sync
hugolatendresse bab8ccb
sync
hugolatendresse f9ed445
ZHIHAO COMMENTS
hugolatendresse 66c01ff
dummy third and foruth inputs
hugolatendresse 4c66590
Merge pull request #4 from hugolatendresse/bridge_works_aggregate
hugolatendresse f73c8e7
sync
hugolatendresse f8619b5
sync
hugolatendresse 2d79719
sync
hugolatendresse 0e6bc47
sync
hugolatendresse c060031
segfault
hugolatendresse 2ac047d
conflicts
hugolatendresse 2e864d9
sync
hugolatendresse bb7c9dd
sync
hugolatendresse e86df71
sync
hugolatendresse 630fa69
sync
hugolatendresse 6d92d9d
sync
hugolatendresse 5996ed1
still country of nation
hugolatendresse 85aa791
test forward task
hugolatendresse cd6de3d
sync
hugolatendresse 1c799fb
sync
hugolatendresse 0d325f8
sync
hugolatendresse 8d55c90
sync
hugolatendresse 34741e0
sync
hugolatendresse 37f71a7
sync
hugolatendresse 58247d9
sync
hugolatendresse da7bc9a
sync
hugolatendresse 92fa0db
sync
hugolatendresse 4ec9bf2
sync
hugolatendresse 024515b
outputting tokens!! (correct tokens)
hugolatendresse 552004c
sync
hugolatendresse b397e70
sync
hugolatendresse a60e3b9
outputting right tokens! fixed regions
hugolatendresse d9af821
sync
hugolatendresse 0eb4815
everything works! moving on to kernel call. Right tokens get outputted
hugolatendresse c46eef4
should still pass
hugolatendresse dc449c0
sync
hugolatendresse 8d59d5b
added docker exec perm for matt
b5b5c1e
outputting right tokens!
hugolatendresse 2527d67
Merge pull request #11 from hugolatendresse/hugo1211
hugolatendresse 0ca8e13
Merge remote-tracking branch 'origin/dev_mixtral' into fixaggregate
hugolatendresse b09144b
added print debug groupby numdims
1e4daa0
added print debug groupby numdims. fixed. no dummy grouped_tokens
d585686
old forward_task
hugolatendresse df4ccb8
softmax = -1. output was 0.
f460ac8
all tokens ok! able to infer with old kernel call
hugolatendresse 02c86cc
sync
hugolatendresse 352577c
sync
hugolatendresse 4f34865
sync
hugolatendresse 281d388
sync
hugolatendresse b14487c
sync
hugolatendresse c1bbfd1
changed dims
23b46f6
changed dims
f432480
sync
hugolatendresse 46b8c68
changed dims
9f6abd1
changed dims
27d48ec
sync
hugolatendresse 9a3ab8d
alpha = 0
e046d01
sync
hugolatendresse 8f4dafd
sync
hugolatendresse 7110763
sync
hugolatendresse 54621b0
sync
hugolatendresse 277ab10
sync
hugolatendresse 8ca5b7b
sync
hugolatendresse 2d3b3f1
sync
hugolatendresse 4101524
num_dims - 1
e572bbc
print groupby ops dims
d555c39
print groupby ops dims
628d2f2
more groupby print
5ba390a
more groupby print
53e556d
removed some hashing stuff. probs wont change anything
14ffa88
doesn't do anything
18f527e
softmax back to 0?
a3b6e2b
using dummy groupby output to check inc decoding stuff
8312b84
was the dim index wrong?
0ee5a76
added kernel print
105419f
added kernel print
23264b4
altered gb_forward_kernel slightly. wasnt recording output, putting i…
72cc1cb
use full seq len
2dcfa01
sync
hugolatendresse b0d5d55
try keeping only 3 dimensions
hugolatendresse 131d6ea
sync
hugolatendresse 92cdb4b
sync
hugolatendresse 4cf85ca
sync
hugolatendresse ccb7216
sync
hugolatendresse 8d32e73
outpoutting tokens
hugolatendresse 1e28a5a
sync
hugolatendresse 0a967d0
sync
hugolatendresse 425983c
sync
hugolatendresse 587bcba
sync
hugolatendresse 2d50fea
sync
hugolatendresse c7862d6
sync
hugolatendresse ff3d849
sync
hugolatendresse eea2720
sync
hugolatendresse ffd8bd9
shortened max len of gen for debugging
6a02a9b
sync
hugolatendresse 2526d5f
outputting tokens using aggregate!!
hugolatendresse e1af57c
outputting tokens using aggregate!!
hugolatendresse 7a3ef50
outputting tokens using aggregate!!
hugolatendresse 06a8380
CHECKPOINT
hugolatendresse 2e5bcdd
added
dc6832b
added
c13ea95
cleanup
hugolatendresse edb4cbf
stop printing wieght file names
hugolatendresse 1de1db4
commented out prints
8faffc1
cleaned up
5e61714
Merge branch 'matt-groupby-1210' into fixed_aggregate
mhk197 c0a1154
Merge pull request #13 from hugolatendresse/fixaggregate
hugolatendresse d8e6b2e
Merge pull request #15 from hugolatendresse/aggregate_works
hugolatendresse 6eeaf92
Merge pull request #14 from hugolatendresse/fixed_aggregate
hugolatendresse 1544ee8
remove hard-coided number of experts
hugolatendresse c4993bc
output
hugolatendresse 74b584c
try few experts
hugolatendresse 6d4ddb5
3
hugolatendresse a3589f5
10 regions
hugolatendresse 22b4ffa
sync
hugolatendresse bd099ea
fixed
hugolatendresse 02624d6
all experts
hugolatendresse 4404694
Merge pull request #18 from hugolatendresse/remove_magic
hugolatendresse e133fc6
cleanup mixtral.cc
hugolatendresse 9bfe777
comments
hugolatendresse 4d39aa4
cleanup
hugolatendresse daaa506
restore backward
hugolatendresse b785259
started cleanup groupby
hugolatendresse 57739b6
if alpha
hugolatendresse 959ec78
if
hugolatendresse a1f8200
remove comments
hugolatendresse f289afc
remove comments
hugolatendresse 01641a4
aggregate
hugolatendresse 74b4d52
remove comment
hugolatendresse 7898107
hidden dim
hugolatendresse a577b65
remove comments
hugolatendresse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
#! /usr/bin/env bash | ||
set -euo pipefail | ||
|
||
# Usage: ./run.sh <docker_image_name> | ||
# Optional environment variables: FF_GPU_BACKEND, cuda_version, hip_version, ATTACH_GPUS, SHM_SIZE | ||
|
||
# Cd into directory holding this script | ||
cd "${BASH_SOURCE[0]%/*}" | ||
|
||
# Parse input params | ||
image=${1:-flexflow} | ||
FF_GPU_BACKEND=${FF_GPU_BACKEND:-cuda} | ||
cuda_version=${cuda_version:-"empty"} | ||
hip_version=${hip_version:-"empty"} | ||
|
||
# Parameter controlling whether to attach GPUs to the Docker container | ||
ATTACH_GPUS=${ATTACH_GPUS:-true} | ||
gpu_arg="" | ||
if $ATTACH_GPUS ; then gpu_arg="--gpus all" ; fi | ||
FORWARD_STREAMLIT_PORT=${FORWARD_STREAMLIT_PORT:-true} | ||
port_forward_arg="" | ||
if $FORWARD_STREAMLIT_PORT ; then | ||
port_forward_arg+="-p 8501:8501" | ||
fi | ||
|
||
|
||
# Amount of shared memory to give the Docker container access to | ||
# If you get a Bus Error, increase this value. If you don't have enough memory | ||
# on your machine, decrease this value. | ||
SHM_SIZE=${SHM_SIZE:-8192m} | ||
|
||
# Check docker image name | ||
if [[ "$image" != @(flexflow-environment|flexflow) ]]; then | ||
echo "Error, image name ${image} is invalid. Choose between 'flexflow-environment', 'flexflow'." | ||
exit 1 | ||
fi | ||
|
||
# Check GPU backend | ||
if [[ "${FF_GPU_BACKEND}" != @(cuda|hip_cuda|hip_rocm|intel) ]]; then | ||
echo "Error, value of FF_GPU_BACKEND (${FF_GPU_BACKEND}) is invalid. Pick between 'cuda', 'hip_cuda', 'hip_rocm' or 'intel'." | ||
exit 1 | ||
elif [[ "${FF_GPU_BACKEND}" != "cuda" ]]; then | ||
echo "Running $image docker image with gpu backend: ${FF_GPU_BACKEND}" | ||
else | ||
echo "Running $image docker image with default GPU backend: cuda" | ||
fi | ||
|
||
# gpu backend version suffix for the docker image. | ||
gpu_backend_version="" | ||
|
||
if [[ "${FF_GPU_BACKEND}" == "cuda" || "${FF_GPU_BACKEND}" == "hip_cuda" ]]; then | ||
# Autodetect cuda version if not specified | ||
if [[ $cuda_version == "empty" ]]; then | ||
# shellcheck disable=SC2015 | ||
cuda_version=$(command -v nvcc >/dev/null 2>&1 && nvcc --version | grep "release" | awk '{print $NF}' || true) | ||
# Change cuda_version eg. V11.7.99 to 11.7 | ||
cuda_version=${cuda_version:1:4} | ||
if [[ -z "$cuda_version" ]]; then | ||
echo "Could not detect CUDA version. Please specify one manually by setting the 'cuda_version' env." | ||
exit 1 | ||
fi | ||
fi | ||
# Check that CUDA version is supported | ||
if [[ "$cuda_version" != @(11.1|11.2|11.3|11.4|11.5|11.6|11.7|11.8|12.0|12.1|12.2|12.3|12.4|12.5|12.6|12.7|12.8|12.9) ]]; then | ||
echo "cuda_version is not supported, please choose among {11.1|11.2|11.3|11.4|11.5|11.6|11.7|11.8|12.0|12.1|12.2}" | ||
exit 1 | ||
fi | ||
# Use CUDA 12.2 for all versions greater or equal to 12.2 for now | ||
if [[ "$cuda_version" == @(12.3|12.4|12.5|12.6|12.7|12.8|12.9) ]]; then | ||
cuda_version=12.2 | ||
fi | ||
# Set cuda version suffix to docker image name | ||
echo "Running $image docker image with CUDA $cuda_version" | ||
gpu_backend_version="-${cuda_version}" | ||
fi | ||
|
||
if [[ "${FF_GPU_BACKEND}" == "hip_rocm" || "${FF_GPU_BACKEND}" == "hip_cuda" ]]; then | ||
# Autodetect HIP version if not specified | ||
if [[ $hip_version == "empty" ]]; then | ||
# shellcheck disable=SC2015 | ||
hip_version=$(command -v hipcc >/dev/null 2>&1 && hipcc --version | grep "HIP version:" | awk '{print $NF}' || true) | ||
# Change hip_version eg. 5.6.31061-8c743ae5d to 5.6 | ||
hip_version=${hip_version:0:3} | ||
if [[ -z "$hip_version" ]]; then | ||
echo "Could not detect HIP version. Please specify one manually by setting the 'hip_version' env." | ||
exit 1 | ||
fi | ||
fi | ||
# Check that HIP version is supported | ||
if [[ "$hip_version" != @(5.3|5.4|5.5|5.6) ]]; then | ||
echo "hip_version is not supported, please choose among {5.3, 5.4, 5.5, 5.6}" | ||
exit 1 | ||
fi | ||
echo "Running $image docker image with HIP $hip_version" | ||
if [[ "${FF_GPU_BACKEND}" == "hip_rocm" ]]; then | ||
gpu_backend_version="-${hip_version}" | ||
fi | ||
fi | ||
|
||
# Check that image exists, if fails, print the default error message. | ||
if [[ "$(docker images -q "${image}-${FF_GPU_BACKEND}${gpu_backend_version}":latest 2> /dev/null)" == "" ]]; then | ||
echo "Error, ${image}-${FF_GPU_BACKEND}${gpu_backend_version}:latest does not exist!" | ||
if [[ "${FF_GPU_BACKEND}" == "cuda" ]]; then | ||
echo "" | ||
echo "To download the docker image, run:" | ||
echo " FF_GPU_BACKEND=${FF_GPU_BACKEND} cuda_version=${cuda_version} $(pwd)/pull.sh $image" | ||
echo "To build the docker image from source, run:" | ||
echo " FF_GPU_BACKEND=${FF_GPU_BACKEND} cuda_version=${cuda_version} $(pwd)/build.sh $image" | ||
echo "" | ||
elif [[ "${FF_GPU_BACKEND}" == "hip_rocm" ]]; then | ||
echo "" | ||
echo "To download the docker image, run:" | ||
echo " FF_GPU_BACKEND=${FF_GPU_BACKEND} hip_version=${hip_version} $(pwd)/pull.sh $image" | ||
echo "To build the docker image from source, run:" | ||
echo " FF_GPU_BACKEND=${FF_GPU_BACKEND} hip_version=${hip_version} $(pwd)/build.sh $image" | ||
echo "" | ||
fi | ||
exit 1 | ||
fi | ||
|
||
cache_volume="-v cache_volume:/root/.cache" | ||
home_volume="-v home_volume:/home" | ||
tmp_volume="-v tmp_volume:/tmp" | ||
|
||
|
||
ssh_key_volume="" | ||
ssh_key_path="$HOME/.ssh/id_rsa" | ||
if [ -f "$ssh_key_path" ] && [ -f "$ssh_key_path.pub" ]; then | ||
ssh_key_volume="-v $ssh_key_path:/root/.ssh/id_rsa -v $ssh_key_path.pub:/root/.ssh/id_rsa.pub" | ||
fi | ||
|
||
docker_command="docker run -it -p 2222:22 $gpu_arg --shm-size=${SHM_SIZE} --cap-add=SYS_PTRACE ${ssh_key_volume} ${cache_volume} ${home_volume} ${tmp_volume} ${port_forward_arg} ${image}-${FF_GPU_BACKEND}${gpu_backend_version}:latest" | ||
echo "$docker_command" | ||
eval "$docker_command" |
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
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo