Unverified Commit f69f6909 authored by zhangyue's avatar zhangyue Committed by GitHub
Browse files

issue/614: fix device class in python

* issue/614: fix device class in python

* issue/614: chang list to List in typing

* issue/614: undo kunlun.lua
parent f1ec6988
......@@ -8,7 +8,7 @@ version = "0.1.0"
description = "InfiniCore 是一个跨平台统一编程工具集,为不同芯片平台的功能(包括计算、运行时、通信等)提供统一 C 语言接口。"
readme = "README.md"
dependencies = []
requires-python = ">=3.10"
requires-python = ">=3.8"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
......
......@@ -93,7 +93,7 @@ class device:
if infinicore_type == infinicore_device.type:
break
base_index += _infinicore.get_device_count(infinicore_device)
base_index += _infinicore.get_device_count(infinicore_type)
return device(type, base_index + infinicore_device.index)
......
from typing import List
from infinicore.lib import _infinicore
from infinicore.tensor import Tensor
def rms_norm(
input: Tensor,
normalized_shape: list[int],
normalized_shape: List[int],
weight: Tensor,
eps: float = 1e-5,
*,
......
......@@ -23,7 +23,7 @@ __C infiniStatus_t infinirtGetAllDeviceCount(int *count_array) {
return INFINI_STATUS_NULL_POINTER;
}
for (size_t i = 0; i < INFINI_DEVICE_TYPE_COUNT; i++) {
if (i == INFINI_DEVICE_ILUVATAR || i == INFINI_DEVICE_KUNLUN || i == INFINI_DEVICE_HYGON) {
if (i == INFINI_DEVICE_ILUVATAR || i == INFINI_DEVICE_HYGON) {
count_array[i] = 0;
continue;
}
......
......@@ -17,6 +17,11 @@ add_linkdirs(path.join(XRE_DIR, "so"))
add_linkdirs(path.join(XDNN_DIR, "so"))
add_linkdirs(path.join(XBLAS_DIR, "so"))
-- Add rpath
add_rpathdirs(path.join(XRE_DIR, "so"))
add_rpathdirs(path.join(XDNN_DIR, "so"))
add_rpathdirs(path.join(XBLAS_DIR, "so"))
-- Add links
add_links("xpurt", "xpuapi", "xpu_blas")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment