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

[Feature] Add GPTQ and uniform interfaces #538

Merged
merged 26 commits into from
May 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
limit sparsegpt test with torch>=1.12
  • Loading branch information
FIRST_NAME LAST_NAME authored and FIRST_NAME LAST_NAME committed May 19, 2023
commit 791dd7c7669230e3c34a65f3ebed2c8827c0cbfc
5 changes: 5 additions & 0 deletions tests/test_impl/test_pruning/test_sparse_gpt/test_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
import torch
import torch.nn as nn

from mmrazor import digit_version
from mmrazor.implementations.pruning import sparse_gpt


class TestSparseGptOps(unittest.TestCase):

@torch.no_grad()
def test_op(self):
if digit_version(torch.__version__) < digit_version('1.12.0'):
self.skipTest('torch<1.12.0')

def get_loss(linear, linear1, data):
y = linear(data)
Expand Down Expand Up @@ -53,6 +56,8 @@ def infer(model, dataset):

@torch.no_grad()
def test_model(self):
if digit_version(torch.__version__) < digit_version('1.12.0'):
self.skipTest('torch<1.12.0')
import torchvision
model = torchvision.models.resnet18()

Expand Down