Skip to content

Add fp16 support#38

Draft
santhnm2 wants to merge 8 commits into
mainfrom
fp16
Draft

Add fp16 support#38
santhnm2 wants to merge 8 commits into
mainfrom
fp16

Conversation

@santhnm2

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread examples/parser.py
Comment thread test/test_grid_search.py
Comment thread dist_ir/backend/torch.py
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
Copy Markdown
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

Comment thread examples/gpt2.py
Comment thread examples/gpt2.py
Comment thread examples/gpt2.py
Comment thread examples/gpt2.py
Comment thread examples/grid_search.py
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread examples/parser.py
"--use_gpu",
action="store_true",
default=torch.cuda.is_available(),
default=False,

Copy link
Copy Markdown
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
Copy Markdown
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