This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch.nn as nn | |
import torch.nn.functional as F | |
from torch.backends.cuda import sdp_kernel, SDPBackend | |
import time | |
import torch | |
import torch.utils.benchmark as benchmark | |
# check dependency | |
assert torch.cuda.is_available(), 'CUDA is expected.' |
OlderNewer