Skip to content
This repository has been archived by the owner on Nov 22, 2022. It is now read-only.

Add nop_decorator #1634

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
32 changes: 32 additions & 0 deletions pytext/task/nop_decorator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reservedimport functools

import functools

# module decorator for specifying acceleration
class accelerator:
def __init__(self, specs, inputs_function=None):
pass

def __call__(self, module):
@functools.wraps(module)
def wrapper(*args, **kwargs):
return module(*args, **kwargs)

return wrapper

@classmethod
def _dfs_modules(cls, node, backend, results, submod_path=""):
pass

@classmethod
def get_modules(cls, model, backend):
pass

@classmethod
def get_module_from_path(cls, model, prefixes):
pass

@classmethod
def get_embedding_module_from_path(cls, model, submod_path):
pass