Skip to content

Commit

Permalink
GroqFlow release v4.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ataheridezfouli-groq committed Sep 29, 2023
1 parent 43da677 commit 99b71dd
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
12 changes: 12 additions & 0 deletions groqflow/justgroqit/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,22 @@ def fire(self, state: build.GroqState):
if state.num_chips_used != 1:
multichip_flag = f"--multichip={state.topology}"
cmd = cmd + [multichip_flag]
if not any(
flag.startswith("--partition-mode=")
for flag in state.config.compiler_flags
):
partition_mode_flag = "--partition-mode=daisy-chain"
cmd = cmd + [partition_mode_flag]

if state.config.groqview:
cmd = cmd + ["--groqview"]

# Add effort=standard by default to help with fit-ability
if not any(
flag.startswith("--effort=") for flag in state.config.compiler_flags
):
cmd = cmd + ["--effort=standard"]

# Add flags
cmd = (
cmd
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ To build and evaluate DistilBERT:

## Expected Results

It takes approximately 8 minutes for DistilBERT to build and about 2 minutes to evaluate the model's accuracy. The example returns the accuracies for both the PyTorch implementation on a CPU and the Groq implementation on 2 GroqCard™ accelerators within a GroqNode™ server.
It takes approximately 8 minutes for DistilBERT to build and about 2 minutes to evaluate the model's accuracy. The example returns the accuracies for both the PyTorch implementation on a CPU and the Groq implementation on 4 GroqCard™ accelerators within a GroqNode™ server.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,12 @@ def evaluate_distilbert(rebuild_policy=None, should_execute=True):
# generate groq model
build_name = "distilbert"
groq_model = groqit(
pytorch_model, dummy_inputs, rebuild=rebuild_policy, build_name=build_name
pytorch_model,
dummy_inputs,
rebuild=rebuild_policy,
build_name=build_name,
num_chips=4,
compiler_flags=["--partition-mode=group-fit"],
)

# compute performance on CPU and GroqChip
Expand Down

0 comments on commit 99b71dd

Please sign in to comment.