Open
Conversation
c99c78a to
fb8eba4
Compare
wooway777
requested changes
Apr 9, 2026
Collaborator
There was a problem hiding this comment.
这三个测试最好不要放在这个文件夹里,infinicore/ops里面放的都是基于测试框架写出来的测试,可以由run.py统一运行。
这种单独写的测试放在这里其他人也很难注意到
Collaborator
There was a problem hiding this comment.
这些跟infinicore/adaptors里的同名接口的区别在于多几个参数是么?
如果他们起到的是类似的效果,是不是应该放在adaptor里面
|
|
||
| namespace { | ||
|
|
||
| __device__ __forceinline__ float bf16_to_f32(__nv_bfloat16 x) { return __bfloat162float(x); } |
|
|
||
| template <> | ||
| struct Convert<__half> { | ||
| __device__ static float to_f32(__half x) { return f16_to_f32(x); } |
Collaborator
There was a problem hiding this comment.
感觉仓库里已经有不少转换函数了,好多kernel里都自己定义了转换函数···不确定应不应该什么时候整理一下
| infiniopTensorDescriptor_t v_desc, | ||
| infiniopTensorDescriptor_t g_gamma_desc) { | ||
|
|
||
| #define CREATE_CUDA(CASE, NAMESPACE) \ |
Collaborator
There was a problem hiding this comment.
我在swiglu里定义create cuda是为了区分cuda/类cuda和通用实现
.gitmodules
Outdated
| path = third_party/nlohmann_json | ||
| url = https://github.com/nlohmann/json.git | ||
| branch = master | ||
| [submodule "third_party/infllmv2_cuda_impl"] |
Collaborator
There was a problem hiding this comment.
这个如果是nv专用的,是不是应该考虑像fla和cutlass一样要求手动拉取,而不是加成submodule所有平台不管用不用都clone
| end | ||
|
|
||
| -- InfLLM-V2 direct kernels (requires aten; link against infllmv2_cuda_impl .so) | ||
| option("infllmv2") |
PanZezhong1725
requested changes
Apr 9, 2026
| // | ||
| // Returns: | ||
| // [total_q, nheads, head_dim] | ||
| Tensor infllmv2_varlen(const Tensor &q, |
Collaborator
There was a problem hiding this comment.
函数名字要体现是attention算子,下同
| } | ||
| auto cpu_lens = seqlens_k.to(at::kCPU); | ||
| int32_t len0 = cpu_lens.numel() > 0 ? cpu_lens.data_ptr<int32_t>()[0] : -1; | ||
| f << "[infinicore][infllmv2][" << op_name << "]" |
| #include <stdexcept> | ||
| #include <vector> | ||
|
|
||
| namespace infinicore::op { |
Collaborator
There was a problem hiding this comment.
这个算子实现是不是应该放到infiniop里去
xmake.lua
Outdated
| add_files("src/infinicore/pybind11/**.cc") | ||
|
|
||
| set_installdir("python/infinicore") | ||
| after_build(function (target) |
Signed-off-by: Ceng23333 <441651826@qq.com>
Signed-off-by: Ceng23333 <441651826@qq.com>
Signed-off-by: Ceng23333 <441651826@qq.com>
0435097 to
b2c5e1b
Compare
Signed-off-by: Ceng23333 <441651826@qq.com>
Signed-off-by: Ceng23333 <441651826@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#1124