MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / build_cutlass3_src_code

Function build_cutlass3_src_code

setup.py:1393–1425  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1391
1392
1393def build_cutlass3_src_code():
1394 target_path = f"{paddle_binary_dir}/python/paddle/apy/matmul_pass/matmul/cutlass-3.7.0"
1395 if not os.path.exists(target_path):
1396 os.mkdir(target_path)
1397 try:
1398 cmd = ['git', 'rev-parse', 'HEAD']
1399 git_commit = (
1400 subprocess.Popen(
1401 cmd,
1402 stdout=subprocess.PIPE,
1403 cwd=f"{paddle_source_dir}/third_party/cutlass",
1404 )
1405 .communicate()[0]
1406 .strip()
1407 )
1408 except:
1409 git_commit = 'Unknown'
1410 raise Exception("obtain commit id of third_party cutlass failed")
1411 commit_id = str(git_commit.decode())
1412 command = (
1413 'cd '
1414 + f'{paddle_source_dir}/third_party/cutlass && '
1415 + 'git checkout v3.7.0 && '
1416 + 'cp '
1417 + f'{paddle_source_dir}/third_party/cutlass/tools -r '
1418 + f'{target_path} && '
1419 + 'cp '
1420 + f'{paddle_source_dir}/third_party/cutlass/include -r '
1421 + f'{target_path} && '
1422 + f'git checkout {commit_id}'
1423 )
1424 if os.system(command) != 0:
1425 raise Exception(f"copy cutlass-3.7.0 failed, command: {command}")
1426
1427
1428def get_cinn_config_jsons():

Callers

nothing calls this directly

Calls 4

strFunction · 0.85
existsMethod · 0.80
decodeMethod · 0.80
communicateMethod · 0.45

Tested by

no test coverage detected