-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to CPU config for better CPU usage.
- Loading branch information
Showing
3 changed files
with
133 additions
and
16 deletions.
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,114 @@ | ||
apiVersion: jobset.x-k8s.io/v1alpha2 | ||
kind: JobSet | ||
metadata: | ||
name: roshanin-test-5 | ||
labels: | ||
kueue.x-k8s.io/queue-name: multislice-queue # Name of the LocalQueue | ||
xpk.google.com/workload: roshanin-test-5 | ||
annotations: | ||
alpha.jobset.sigs.k8s.io/exclusive-topology: cloud.google.com/gke-nodepool # 1:1 job replica to node pool assignment | ||
spec: | ||
ttlSecondsAfterFinished: 43200 | ||
failurePolicy: | ||
maxRestarts: 0 | ||
replicatedJobs: | ||
- name: slice-job | ||
replicas: 1 | ||
template: | ||
spec: | ||
parallelism: 1 # Equal to the number of VMs per slice | ||
completions: 1 # Same as the above. | ||
backoffLimit: 0 # When any pod fails, the job is failed | ||
template: | ||
metadata: | ||
labels: | ||
xpk.google.com/workload: roshanin-cpu-test-2 | ||
spec: | ||
schedulerName: default-scheduler | ||
restartPolicy: Never | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: cloud.google.com/gke-nodepool | ||
operator: NotIn | ||
values: | ||
- default-pool | ||
|
||
nodeSelector: | ||
|
||
|
||
|
||
priorityClassName: medium | ||
hostNetwork: true | ||
dnsPolicy: ClusterFirstWithHostNet | ||
terminationGracePeriodSeconds: 30 | ||
containers: | ||
- name: jax-tpu | ||
image: gcr.io/tpu-prod-env-multipod/maxtext_jax_stable_stack:2025-01-13 | ||
|
||
env: | ||
- name: REPLICATED_JOB_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.annotations['jobset.sigs.k8s.io/replicatedjob-name'] | ||
- name: JOB_INDEX | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.annotations['jobset.sigs.k8s.io/job-index'] | ||
- name: JOB_COMPLETION_INDEX | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.annotations['batch.kubernetes.io/job-completion-index'] | ||
- name: PROCESSES_IN_JOB | ||
value: "1" | ||
- name: JAX_PROCESS_COUNT | ||
value: "1" | ||
|
||
- name: GCS_OUTPUT | ||
value: "gs://ml-auto-solutions/output/sparsity_diffusion_devx/maxtext/chained_tests_mixtral-8x7b_stable-2025-01-13-05-00-09/" | ||
- name: JAX_COORDINATOR_ADDRESS | ||
value: "$(JOBSET_NAME)-$(REPLICATED_JOB_NAME)-0-0.$(JOBSET_NAME)" | ||
|
||
ports: | ||
- containerPort: 8471 | ||
- containerPort: 8080 | ||
- containerPort: 1234 | ||
securityContext: | ||
privileged: true | ||
command: | ||
- bash | ||
- -c | ||
- | | ||
echo XPK Start: $(date); | ||
_sigterm() (kill -SIGTERM $! 2>/dev/null;); | ||
trap _sigterm SIGTERM; | ||
(set -xue;export BASE_OUTPUT_PATH=$GCS_OUTPUT; bash end_to_end/tpu/mixtral/8x7b/1_test_mixtral.sh) & PID=$!; | ||
while kill -0 $PID 2>/dev/null; | ||
do sleep 5; | ||
done; | ||
wait $PID; | ||
EXIT_CODE=$?; | ||
echo XPK End: $(date); | ||
echo EXIT_CODE=$EXIT_CODE; | ||
if [ "$EXIT_CODE" = 143 ]; then | ||
exit $EXIT_CODE | ||
fi | ||
exit $EXIT_CODE | ||
resources: | ||
limits: | ||
cpu: | ||
|
||
volumeMounts: | ||
- mountPath: /dev/shm | ||
name: dshm-2 | ||
|
||
volumes: | ||
- emptyDir: | ||
medium: Memory | ||
name: dshm-2 |