MCPcopy Create free account
hub / github.com/apache/tvm / have_fp16

Function have_fp16

python/tvm/support/nvcc.py:1036–1052  ·  view source on GitHub ↗

Either fp16 support is provided in the compute capability or not Parameters ---------- compute_version: str compute capability of a GPU (e.g. "6.0")

(compute_version)

Source from the content-addressed store, hash-verified

1034
1035
1036def have_fp16(compute_version):
1037 """Either fp16 support is provided in the compute capability or not
1038
1039 Parameters
1040 ----------
1041 compute_version: str
1042 compute capability of a GPU (e.g. "6.0")
1043 """
1044 major, minor = parse_compute_version(compute_version)
1045 # fp 16 support in reference to:
1046 # https://docs.nvidia.com/cuda/cuda-c-programming-guide/#arithmetic-instructions
1047 if major == 5 and minor == 3:
1048 return True
1049 if major >= 6:
1050 return True
1051
1052 return False
1053
1054
1055def have_int8(compute_version):

Callers 4

check_cudaFunction · 0.90
checkFunction · 0.90
run_testFunction · 0.90

Calls 1

parse_compute_versionFunction · 0.70

Tested by 4

check_cudaFunction · 0.72
checkFunction · 0.72
run_testFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…