Make Python interface work for non-SM80 targets (#726)
* Make Python interface work for non-SM80 targets * Remove line in README
This commit is contained in:
@@ -34,6 +34,7 @@ import pycutlass
|
||||
from pycutlass import *
|
||||
from pycutlass.conv2d_operation import *
|
||||
from pycutlass.utils import reference_model
|
||||
from pycutlass.utils.device import device_cc
|
||||
import sys
|
||||
import torch.nn.functional as F
|
||||
|
||||
@@ -146,6 +147,11 @@ try:
|
||||
except:
|
||||
sys.exit(0)
|
||||
|
||||
cc = device_cc()
|
||||
if args.compute_capability != cc:
|
||||
raise Exception(("Parameter --compute-capability of {} "
|
||||
"does not match that of the device of {}.").format(args.compute_capability, cc))
|
||||
|
||||
pycutlass.get_memory_pool(init_pool_size=2**30, max_pool_size=2**32)
|
||||
|
||||
np.random.seed(0)
|
||||
|
||||
@@ -34,6 +34,7 @@ import pycutlass
|
||||
from pycutlass import *
|
||||
import cutlass
|
||||
from bfloat16 import bfloat16
|
||||
from pycutlass.utils.device import device_cc
|
||||
import sys
|
||||
|
||||
import argparse
|
||||
@@ -131,12 +132,16 @@ parser.add_argument("-activ_arg", "--activation_args", default=[], nargs="+", ty
|
||||
parser.add_argument('--print_cuda', action="store_true",
|
||||
help="print the underlying CUDA kernel")
|
||||
|
||||
|
||||
try:
|
||||
args = parser.parse_args()
|
||||
except:
|
||||
sys.exit(0)
|
||||
|
||||
cc = device_cc()
|
||||
if args.compute_capability != cc:
|
||||
raise Exception(("Parameter --compute-capability of {} "
|
||||
"does not match that of the device of {}.").format(args.compute_capability, cc))
|
||||
|
||||
pycutlass.get_memory_pool(init_pool_size=2**30, max_pool_size=2**32)
|
||||
pycutlass.compiler.nvcc()
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
import numpy as np
|
||||
import pycutlass
|
||||
from pycutlass import *
|
||||
from pycutlass.utils.device import device_cc
|
||||
import csv
|
||||
import sys
|
||||
|
||||
@@ -129,6 +130,11 @@ try:
|
||||
except:
|
||||
sys.exit(0)
|
||||
|
||||
cc = device_cc()
|
||||
if args.compute_capability != cc:
|
||||
raise Exception(("Parameter --compute-capability of {} "
|
||||
"does not match that of the device of {}.").format(args.compute_capability, cc))
|
||||
|
||||
pycutlass.get_memory_pool(init_pool_size=2**30, max_pool_size=2**32)
|
||||
|
||||
np.random.seed(0)
|
||||
|
||||
Reference in New Issue
Block a user