Skip to content

Instantly share code, notes, and snippets.

View amangup's full-sized avatar

Aman Gupta amangup

  • San Francisco, CA
View GitHub Profile
@amangup
amangup / default_config.yaml
Last active October 15, 2023 04:50
Accelerate DDP config
compute_environment: LOCAL_MACHINE
debug: false
distributed_type: MULTI_GPU
downcast_bf16: 'no'
gpu_ids: all
machine_rank: 0
main_training_function: main
mixed_precision: bf16
num_machines: 1
num_processes: 8
@amangup
amangup / CountdownLatch.java
Last active December 17, 2015 13:39
CountDownLatch using wait() and notifyAll()
public class CountDownLatch {
private Integer size;
private final Object lock = new Object();
public CountDownLatch(int n) {
assert(n > 0);
this.size = n;
}
public void await() {