Skip to content

Commit

Permalink
replace cuda for jit scripted modules
Browse files Browse the repository at this point in the history
Signed-off-by: Nithin Rao Koluguri <nithinraok>
  • Loading branch information
Nithin Rao Koluguri committed Sep 16, 2024
1 parent e7ae53c commit 19b654f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nemo/utils/export_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def verify_torchscript(model, output, input_examples, check_tolerance=0.01):
for input_example in input_examples:
input_list, input_dict = parse_input_example(input_example)
# We disable autocast here to make sure exported TS will run under Triton or other C++ env
with torch.amp.autocast(model.device.type, enabled=False):
with torch.amp.autocast('cuda', enabled=False):
output_example = model.forward(*input_list, **input_dict)
ts_model = torch.jit.load(output)
all_good = all_good and run_ts_and_compare(
Expand Down

0 comments on commit 19b654f

Please sign in to comment.