I run the code as follows:
import os
os.environ["CUDA_VISIBLE_DEVICES"] = '1'

import torch
import torch.nn as nn
from torch.autograd import Variable

import time
from modules import *

def main():
    test_data64 = Variable(torch.randn(1,64,56,56))
    m_baseline64 = nn.Conv2d(64, 64, kernel_size=3, stride=1, padding=1, bias=False)
    time1_list = []
    for i in range(10000):
        start = torch.cuda.Event(enable_timing=True)
        end = torch.cuda.Event(enable_timing=True)
        
        start.record()
        m_baseline64(test_data64)
        end.record()
        
        torch.cuda.synchronize()
        time1_list.append(start.elapsed_time(end))

    print('m_baseline64:%.8f' %(sum(time1_list[1000:])/len(time1_list[1000:])))
    
    test_data36 = Variable(torch.randn(1,36,56,56))
    m_baseline36 = nn.Conv2d(36, 36, kernel_size=3, stride=1, padding=1, bias=False)
    time2_list = []
    for i in range(10000):
        start = torch.cuda.Event(enable_timing=True)
        end = torch.cuda.Event(enable_timing=True)
        
        start.record()
        m_baseline36(test_data36)
        end.record()
        
        torch.cuda.synchronize()
        time2_list.append(start.elapsed_time(end))

    print('m_baseline36:%.8f' %(sum(time2_list[1000:])/len(time2_list[1000:])))

if __name__=='__main__':
    main()

The theoretical flops for ‘’‘m_baseline64’’’ should be about 3.16 times than ‘’‘m_baseline36’’’
However, when I run the code in GPU mode, the real time of m_baseline64 and m_baseline36 is 0.100s and 0.089s, respectively,  which is very strange. Then I run the code on CPU mode, the real time of m_baseline64 and m_baseline36 is 4.536s and 1.684s, which is match for the theoretical ratio.
Anyone can help me?