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

Add fp16 support #38

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft

Add fp16 support #38

wants to merge 8 commits into from

Conversation

santhnm2
Copy link
Collaborator

No description provided.

@@ -415,8 +417,12 @@ def print_memory_usage():
assert isinstance(output, tuple)
for i, v in enumerate(op.outputs):
value_map[v] = output[i]
if torch.any(torch.isnan(output[i])):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd put these under a debug flag to avoid slowing down executions

args.dram_bandwidth = simulation_parameters["dram_bandwidth"]
args.kernel_launch_overhead = simulation_parameters["kernel_launch_overhead"]
args.device_throughput = 1.0 / simulation_parameters["device_parameters"][0]
args.dram_bandwidth = 1.0 / simulation_parameters["device_parameters"][1]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Won't this become infinity if one of the regression coefficients is 0?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yea but I think that's ok for now since we don't see much utility from the dram bandwidth at sufficiently large data sizes right?

Copy link
Collaborator

Choose a reason for hiding this comment

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

When I ran it before Tue's meeting, it threw a RuntimeError for dividing by zero (not sure if it was from this line though), so maybe safer to store the parameters if you run into that error again.

@@ -89,7 +90,7 @@ def add_backend_config_arguments(self):
self.add_argument(
"--use_gpu",
action="store_true",
default=torch.cuda.is_available(),
default=False,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you change the default?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There's no way to only use CPU otherwise, but maybe we should just make this --use_cpu instead

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.

2 participants