mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-13 17:55:48 +00:00
fix parsing instances for pt inductor (#1796)
add unit test for gen instances for gemms
add unit tests for conv and batched gemms
add unit test for preselected gemm instances
apply ruff lint
add license header for the unit test
add inductor pytest to CI
verbose pip install
switch the directory before installing python packages
move the inductor codegen test
try yet another workdir
Update Jenkinsfile
The directory looks right, fixing pip module not found by invoking pip directly
Update Jenkinsfile
invoke pytest directly since the module is not found
Update Dockerfile
Install setuptools
update package structure
bump setuptools
maybe fix data path for library sources
fix library search path for conv instances
fix path in pyproject definition
compare path used in gen_instances with one in pyproject.toml; fix the difference
Co-authored-by: Illia Silin <98187287+illsilin@users.noreply.github.com>
[ROCm/composable_kernel commit: c0b90f130f]
This commit is contained in:
@@ -68,12 +68,13 @@ def parse_instances(str_instances: List[str]) -> List[CKGemmOperation]:
|
||||
|
||||
template_args.insert(2, tuple()) # ds layout
|
||||
template_args.insert(6, tuple()) # ds dtype
|
||||
|
||||
new_instance = CKGemmOperation(
|
||||
*template_args, # type: ignore[arg-type]
|
||||
)
|
||||
|
||||
op_instances.append(new_instance)
|
||||
try:
|
||||
new_instance = CKGemmOperation(
|
||||
*template_args, # type: ignore[arg-type]
|
||||
)
|
||||
op_instances.append(new_instance)
|
||||
except TypeError as e:
|
||||
log.debug(f"{e} when parsing {line}")
|
||||
return op_instances
|
||||
|
||||
|
||||
|
||||
46
python/test/test_gen_instances.py
Normal file
46
python/test/test_gen_instances.py
Normal file
@@ -0,0 +1,46 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (c) 2018-2025, Advanced Micro Devices, Inc. All rights reserved.
|
||||
import logging
|
||||
|
||||
import unittest
|
||||
|
||||
from ck4inductor.universal_gemm.gen_instances import (
|
||||
gen_ops_library as gen_gemm_ops_library,
|
||||
)
|
||||
from ck4inductor.universal_gemm.gen_instances import (
|
||||
gen_ops_preselected as gen_gemm_ops_preselected,
|
||||
)
|
||||
from ck4inductor.grouped_conv_fwd.gen_instances import (
|
||||
gen_conv_ops_library as gen_conv_ops_library,
|
||||
)
|
||||
from ck4inductor.batched_universal_gemm.gen_instances import (
|
||||
gen_ops_library as gen_batched_gemm_ops_library,
|
||||
)
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
class TestGenInstances(unittest.TestCase):
|
||||
def test_gen_gemm_instances(self):
|
||||
instances = gen_gemm_ops_library()
|
||||
|
||||
log.debug("%d gemm instances from library" % len(instances))
|
||||
self.assertTrue(instances)
|
||||
|
||||
def test_preselected_gemm_instances(self):
|
||||
instances = gen_gemm_ops_preselected()
|
||||
|
||||
log.debug("%d preselected gemm instances" % len(instances))
|
||||
self.assertTrue(instances)
|
||||
|
||||
def test_gen_conv_instances(self):
|
||||
instances = gen_conv_ops_library()
|
||||
|
||||
log.debug("%d gemm instances from library" % len(instances))
|
||||
self.assertTrue(instances)
|
||||
|
||||
def test_gen_batched_gemm_instances(self):
|
||||
instances = gen_batched_gemm_ops_library()
|
||||
|
||||
log.debug("%d gemm instances from library" % len(instances))
|
||||
self.assertTrue(instances)
|
||||
Reference in New Issue
Block a user