Skip to content
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

support dlrm eager train #382

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

support dlrm eager train #382

wants to merge 1 commit into from

Conversation

ShawnXuan
Copy link
Contributor

No description provided.

save_model("initial_checkpoint")

opt = flow.optim.SGD(dlrm_module.parameters(), lr=args.learning_rate)
lr_scheduler = make_lr_scheduler(args, opt)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lr_scheduler = make_lr_scheduler(args, opt)
lr_scheduler = make_lr_scheduler(args, opt)
opt = flow.one_embedding.Optimizer(
opt, embeddings=[dlrm_module.embedding.one_embedding]
)

test_case=g${num_gpus}_lr${lr}_t${train_batches}_b${train_batch_size}_d${decay_batches}
echo $test_case

export ONEFLOW_ONE_EMBEDDING_EAGER=1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export ONEFLOW_ONE_EMBEDDING_EAGER=1


opt = flow.optim.SGD(dlrm_module.parameters(), lr=args.learning_rate)
lr_scheduler = make_lr_scheduler(args, opt)
loss_fn = flow.nn.BCEWithLogitsLoss(reduction="none").to("cuda")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里应该reduction直接设置为mean,才有可能用那个bce fuse kernel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants