diff --git a/master/doctrees/appdevelop/convertmodel.doctree b/master/doctrees/appdevelop/convertmodel.doctree index 14dac0c..1700836 100644 Binary files a/master/doctrees/appdevelop/convertmodel.doctree and b/master/doctrees/appdevelop/convertmodel.doctree differ diff --git a/master/doctrees/appdevelop/createmodel.doctree b/master/doctrees/appdevelop/createmodel.doctree index 0c0067d..26c1c85 100644 Binary files a/master/doctrees/appdevelop/createmodel.doctree and b/master/doctrees/appdevelop/createmodel.doctree differ diff --git a/master/doctrees/appdevelop/index.doctree b/master/doctrees/appdevelop/index.doctree index 1a7a31e..9ed9545 100644 Binary files a/master/doctrees/appdevelop/index.doctree and b/master/doctrees/appdevelop/index.doctree differ diff --git a/master/doctrees/appdevelop/inference.doctree b/master/doctrees/appdevelop/inference.doctree index 812ecd1..923a892 100644 Binary files a/master/doctrees/appdevelop/inference.doctree and b/master/doctrees/appdevelop/inference.doctree differ diff --git a/master/doctrees/environment.pickle b/master/doctrees/environment.pickle index 30d2aae..3f67850 100644 Binary files a/master/doctrees/environment.pickle and b/master/doctrees/environment.pickle differ diff --git a/master/doctrees/functionlib/dsplib/add.doctree b/master/doctrees/functionlib/dsplib/add.doctree index 01bc07a..2a0dbd2 100644 Binary files a/master/doctrees/functionlib/dsplib/add.doctree and b/master/doctrees/functionlib/dsplib/add.doctree differ diff --git a/master/doctrees/functionlib/dsplib/dsplib_index.doctree b/master/doctrees/functionlib/dsplib/dsplib_index.doctree index 94c64fb..573c5e6 100644 Binary files a/master/doctrees/functionlib/dsplib/dsplib_index.doctree and b/master/doctrees/functionlib/dsplib/dsplib_index.doctree differ diff --git a/master/doctrees/functionlib/dsplib/equal.doctree b/master/doctrees/functionlib/dsplib/equal.doctree new file mode 100644 index 0000000..faa6819 Binary files /dev/null and b/master/doctrees/functionlib/dsplib/equal.doctree differ diff --git a/master/doctrees/functionlib/dsplib/fft_with_size.doctree b/master/doctrees/functionlib/dsplib/fft_with_size.doctree index f0d839e..5bf06ac 100644 Binary files a/master/doctrees/functionlib/dsplib/fft_with_size.doctree and b/master/doctrees/functionlib/dsplib/fft_with_size.doctree differ diff --git a/master/doctrees/functionlib/dsplib/log10.doctree b/master/doctrees/functionlib/dsplib/log10.doctree new file mode 100644 index 0000000..c3d635f Binary files /dev/null and b/master/doctrees/functionlib/dsplib/log10.doctree differ diff --git a/master/doctrees/functionlib/index.doctree b/master/doctrees/functionlib/index.doctree index 7616e28..4828c98 100644 Binary files a/master/doctrees/functionlib/index.doctree and b/master/doctrees/functionlib/index.doctree differ diff --git a/master/doctrees/functionlib/supported_op.doctree b/master/doctrees/functionlib/supported_op.doctree index 7856d79..61c796e 100644 Binary files a/master/doctrees/functionlib/supported_op.doctree and b/master/doctrees/functionlib/supported_op.doctree differ diff --git a/master/doctrees/index.doctree b/master/doctrees/index.doctree index 8d94a97..15cb34c 100644 Binary files a/master/doctrees/index.doctree and b/master/doctrees/index.doctree differ diff --git a/master/doctrees/quickstart/helloworld.doctree b/master/doctrees/quickstart/helloworld.doctree index d0afc18..20716c3 100644 Binary files a/master/doctrees/quickstart/helloworld.doctree and b/master/doctrees/quickstart/helloworld.doctree differ diff --git a/master/doctrees/quickstart/index.doctree b/master/doctrees/quickstart/index.doctree index b952b7f..1039c3c 100644 Binary files a/master/doctrees/quickstart/index.doctree and b/master/doctrees/quickstart/index.doctree differ diff --git a/master/doctrees/quickstart/installation.doctree b/master/doctrees/quickstart/installation.doctree index 5409ca4..38c473e 100644 Binary files a/master/doctrees/quickstart/installation.doctree and b/master/doctrees/quickstart/installation.doctree differ diff --git a/master/doctrees/quickstart/overview.doctree b/master/doctrees/quickstart/overview.doctree index 7747897..2fa8fbe 100644 Binary files a/master/doctrees/quickstart/overview.doctree and b/master/doctrees/quickstart/overview.doctree differ diff --git a/master/doctrees/refdoc/index.doctree b/master/doctrees/refdoc/index.doctree index 09f6a59..b0dfc35 100644 Binary files a/master/doctrees/refdoc/index.doctree and b/master/doctrees/refdoc/index.doctree differ diff --git a/master/doctrees/refdoc/mindspore.doctree b/master/doctrees/refdoc/mindspore.doctree index de13e21..56a1a70 100644 Binary files a/master/doctrees/refdoc/mindspore.doctree and b/master/doctrees/refdoc/mindspore.doctree differ diff --git a/master/doctrees/refdoc/signal_scheduling.doctree b/master/doctrees/refdoc/signal_scheduling.doctree index 8d78090..211b96a 100644 Binary files a/master/doctrees/refdoc/signal_scheduling.doctree and b/master/doctrees/refdoc/signal_scheduling.doctree differ diff --git a/master/html/.buildinfo b/master/html/.buildinfo index 66982b1..6c2fd75 100644 --- a/master/html/.buildinfo +++ b/master/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 -# This file records the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 7751dc06307578150521034718957d1a +# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. +config: 0d3025befe3dc6f9dfad874d86b2ff0a tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt b/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt index 82787eb..08c29cd 100644 --- a/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt +++ b/master/html/_sources/functionlib/dsplib/dsplib_index.rst.txt @@ -5,4 +5,6 @@ DSP Library C API Reference :maxdepth: 1 add - fft_with_size \ No newline at end of file + equal + fft_with_size + log10 \ No newline at end of file diff --git a/master/html/_sources/functionlib/dsplib/equal.rst.txt b/master/html/_sources/functionlib/dsplib/equal.rst.txt new file mode 100644 index 0000000..aac3b73 --- /dev/null +++ b/master/html/_sources/functionlib/dsplib/equal.rst.txt @@ -0,0 +1,115 @@ +Equal +================= + + +**共享存储版本:** + +.. c:function:: void i8_equal_s(int8_t* Input0, int8_t* Input1, bool* output,int length, int core_mask) +.. c:function:: void i16_equal_s(int16_t* Input0, int16_t* Input1, bool* output,int length, int core_mask) +.. c:function:: void i32_equal_s(int* Input0, int* Input1, bool* output,int length, int core_mask) +.. c:function:: void hp_equal_s(half* Input0, half* Input1, bool* output,int length, int core_mask) +.. c:function:: void fp_equal_s(float* Input0, float* Input1, bool* output,int length, int core_mask) +.. c:function:: void dp_equal_s(double* Input0, double* Input1, bool* output,int length, int core_mask) +.. c:function:: void c64_equal_s(float* Input0, float* Input1, bool* output,int length, int core_mask) +.. c:function:: void c128_equal_s(double* Input0, double* Input1, bool* output, int length, int core_mask) + + 逐元素计算两个输入是否相等 + + .. math:: + + output_i = \begin{cases} + \text{True}, & \text{if } Input0_i = Input1_i \\ + \text{False}, & \text{if } Input0_i \neq Input1_i + \end{cases} + + 输入: + - **Input0** - 第一个输入数据地址。 + - **Input1** - 第二个输入数据地址。 + - **length** - 计算长度。 + - **core_mask** - 核掩码。 + + 输出: + - **output** - 计算结果地址。 + + 支持平台: + ``FT78NE`` + ``MT7004`` + + .. note:: + - FT78NE 支持int8, int16, int32, fp32, fp64, cplx64, cplx128 + - MT7004 支持fp16, fp32, int16, int32, cplx64 + + **C调用示例:** + + .. code-block:: c + :linenos: + :emphasize-lines: 10 + + //FT78NE示例 + #include + + int main(int argc, char* argv[]) { + float *input0 = (float *)0xA0000000; //input在DDR空间 + float *input1 = (float *)0xB0000000; + bool *output = (bool *)0xC0000000; + int length = 1000; + int core_mask = 0xff; + fp_equal_p(input0, input1, output, length, core_mask); + return 0; + } + + +**私有存储版本:** + +.. c:function:: void i8_equal_p(int8_t *Input0, int8_t *Input1, bool *output, int length) +.. c:function:: void i16_equal_p(int16_t *Input0, int16_t *Input1, bool *output, int length) +.. c:function:: void i32_equal_p(int32_t *Input0, int32_t *Input1, bool *output, int length) +.. c:function:: void hp_equal_p(half* Input0, half* Input1, bool* output,int length) +.. c:function:: void fp_equal_p(float* Input0, float* Input1, bool* output,int length) +.. c:function:: void dp_equal_p(double* Input0, double* Input1, bool* output,int length) +.. c:function:: void c64_equal_p(float *Input0, float *Input1, bool *output, int length) +.. c:function:: void c128_equal_p(double *Input0, double *Input1, bool *output, int length) + + 逐元素计算两个输入是否相等 + + .. math:: + + output_i = \begin{cases} + \text{True}, & \text{if } Input0_i = Input1_i \\ + \text{False}, & \text{if } Input0_i \neq Input1_i + \end{cases} + + + 输入: + - **Input0** - 第一个输入数据地址。 + - **Input1** - 第二个输入数据地址。 + - **length** - 计算长度。 + + 输出: + - **output** - 计算结果地址。 + + 支持平台: + ``FT78NE`` + ``MT7004`` + + .. note:: + - FT78NE 支持int8, int16, int32, fp32, fp64, cplx64, cplx128 + - MT7004 支持fp16, fp32, int16, int32, cplx64 + + **C调用示例:** + + .. code-block:: c + :linenos: + :emphasize-lines: 9 + + //FT78NE示例 + #include + + int main(int argc, char* argv[]) { + float *input0 = (float *)0x10000000; //input在L2空间 + float *input1 = (float *)0x10001000; + bool *output = (bool *)0xC0000000; + int length = 1000; + fp_equal_p(input0, input1, output, length); + return 0; + } \ No newline at end of file diff --git a/master/html/_sources/functionlib/dsplib/log10.rst.txt b/master/html/_sources/functionlib/dsplib/log10.rst.txt new file mode 100644 index 0000000..51d0df7 --- /dev/null +++ b/master/html/_sources/functionlib/dsplib/log10.rst.txt @@ -0,0 +1,44 @@ +Log10 +================= + +**共享存储版本:** + +.. c:function:: void fp_log10_s( float* input1,int n,float* output,int mask); + + 快速计算以10为底的对数 + + .. math:: + + output_i = \log_{10}(input1_i) + + 输入: + - **Input1** - 输入数据地址。 + - **n** - 计算长度。 + - **mask** - 核掩码。 + + 输出: + - **output** - 计算结果地址。 + + 支持平台: + ``MT7004`` + + .. note:: + - MT7004 支持fp32 + + **C调用示例:** + + .. code-block:: c + :linenos: + :emphasize-lines: 8 + + //MT7004示例 + #include + + int main(int argc, char* argv[]) { + float *input1 = (float *)0x100000000; //input在DDR空间 + float *output = (float *)0x100001000; + int n = 1000; + int mask = 0xf; + fp_log10_s(input1, n, output, mask); + return 0; + } diff --git a/master/html/_sources/functionlib/supported_op.md.txt b/master/html/_sources/functionlib/supported_op.md.txt index c95d8ab..abd0916 100644 --- a/master/html/_sources/functionlib/supported_op.md.txt +++ b/master/html/_sources/functionlib/supported_op.md.txt @@ -1 +1,240 @@ -# 算子库支持情况 \ No newline at end of file +# 算子库支持情况 + + +- MindSpore Lite支持不同硬件后端的算子列表 +
+ +| 操作名
  | CPU
FP16 | CPU
FP32 | CPU
Int32 | CPU
Int8 | CPU
UInt8 | CPU
Bool | 7004 DSP
FP16 | 7004 DSP
FP32 | 7004 DSP
Int16 | 7004 DSP
Cplx64 | 7004 DSP
Int32 | 6678e DSP
FP32 | 6678e DSP
FP64 | 6678e DSP
Cplx64 | 6678e DSP
Cplx128 | 6678e DSP
Int8 | 6678e DSP
Int16 | 6678e DSP
Int32 | +| ----------------------------------- | ---------- | ---------- | ------------- | ---------- | ----------- | ------------ | --------------- | --------------- | --------------- | --------------- | ------------------ | ---------------- | ---------------- | ------------------ | ------------------ | ---------------- | ---------------- | ------------------ | +| Abs | ✅ | ✅ | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | +| AbsGrad | | ✅ | | | | | | | | | | | | | | | | | +| Activation | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| ActivationGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Adam | | ✅ | | | | | | | | | | | | | | | | | +| AddFusion | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| AdderFusion | | ✅ | | | | | | | | | | | | | | | | | +| AddGrad | | ✅ | | | | | | | | | | | | | | | | | +| AddN | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Affine | | ✅ | | | | | | | | | | | | | | | | | +| All | | ✅ | | | | | | | | | | | | | | | | | +| AllGather | | ✅ | | | | | | | | | | | | | | | | | +| ApplyMomentum | | ✅ | | | | | | | | | | | | | | | | | +| Assert | ✅ | ✅ | | | | ✅ | | | | | | | | | | | | | +| Assign | | ✅ | | | | | | | | | | | | | | | | | +| ArgmaxFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| ArgminFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| AvgPoolFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| AvgPoolGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| BatchNorm | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| BatchNormGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| BatchToSpace | | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| BatchToSpaceND | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| BiasAdd | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| BiasAddGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| BinaryCrossEntropy | | ✅ | | | | | | | | | | | | | | | | | +| BinaryCrossEntropyGrad | | ✅ | | | | | | | | | | | | | | | | | +| BroadcastTo | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| Call | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| Cast | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| Ceil | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| Clip | | ✅ | ✅ | | | | | | | | | | | | | | | | +| Concat | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| ConstantOfShape | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| Conv2DFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| Conv2DBackpropFilterFusion | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Conv2DBackpropInputFusion | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Conv2dTransposeFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| Cos | ✅ | ✅ | | ✅ | ✅ | | | ✅ | | | | | | | | | | | +| Crop | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| CropAndResize | | ✅ | | | | | | | | | | | | | | | | | +| CumSum | | ✅ | ✅ | | | | | | | | | | | | | | | | +| CustomExtractFeatures | | ✅ | | | | | | | | | | | | | | | | | +| CustomNormalize | | ✅ | | | | | | | | | | | | | | | | | +| CustomPredict | | ✅ | ✅ | | | | | | | | | | | | | | | | +| DEConv2DGradFilter | | ✅ | | | | | | | | | | | | | | | | | +| DepthToSpace | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| DetectionPostProcess | | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| DivFusion | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| DivGrad | | ✅ | | | | | | | | | | | | | | | | | +| Dropout | ✅ | ✅ | | | | | | | | | | | | | | | | | +| DropoutGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| DynamicQuant | | ✅ | | | | | | | | | | | | | | | | | +| Eltwise | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| Elu | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Equal | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| EmbeddingLookupFusion | | ✅ | | | | | | | | | | | | | | | | | +| Erf | ✅ | ✅ | | | | | | | | | | | | | | | | | +| ExpFusion | ✅ | ✅ | | | | | | ✅ | |✅ | |✅ | | | | | | | +| ExpandDims | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| Fill | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| Flatten | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| FlattenGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Floor | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| FloorDiv | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| FloorMod | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| FullConnection | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| FusedBatchNorm | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| GatherNd | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| Gather | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| GatherD | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| GLU | | ✅ | | | | | | | | | | | | | | | | | +| Greater | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| GreaterEqual | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| GroupNormFusion | | ✅ | | | | | | | | | | | | | | | | | +| GRU | ✅ | ✅ | | | | | | | | | | | | | | | | | +| HashtableLookup | | ✅ | ✅ | | | | | | | | | | | | | | | | +| InstanceNorm | ✅ | ✅ | | | | | | | | | | | | | | | | | +| InvertPermutation | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| IsFinite | | ✅ | | | | | | | | | | | | | | | | | +| L2NormalizeFusion | | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| LayerNormFusion | ✅ | ✅ | | ✅ | | | | | | | | | | | | | | | +| LayerNormGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| LeakyReLU | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| Less | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| LessEqual | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| LRN | | ✅ | | | | | | | | | | | | | | | | | +| Log | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| Log1p | | ✅ | | | | | | | | | | | | | | | | | +| LogGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| LogicalAnd | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| LogicalNot | ✅ | ✅ | | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| LogicalOr | ✅ | ✅ | | | | ✅ | | | | | | | | | | | | | +| LogSoftmax | ✅ | ✅ | | | | | | | | | | | | | | | | | +| LshProjection | | ✅ | | | | | | | | | | | | | | | | | +| LSTM | ✅ | ✅ | | | | | | | | | | | | | | | | | +| LSTMGrad | | ✅ | | | | | | | | | | | | | | | | | +| LSTMGradData | | ✅ | | | | | | | | | | | | | | | | | +| LSTMGradWeight | | ✅ | | | | | | | | | | | | | | | | | +| MatMulFusion | ✅ | ✅ | | ✅ | ✅ | | |✅ | | | |✅ | | | | | | | +| Maximum | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| MaximumGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| MaxPoolFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| MaxPoolGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Merge | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Minimum | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| MinimumGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Mod | | ✅ | ✅ | | | | | | | | | | | | | | | | +| MulFusion | ✅ | ✅ | ✅ | ✅ | ✅ | | | | |✅ | | | | | | | | | +| MulGrad | | ✅ | | | | | | | | | | | | | | | | | +| Neg | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| NegGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| NLLLoss | | ✅ | | | | | | | | | | | | | | | | | +| NLLLossGrad | | ✅ | | | | | | | | | | | | | | | | | +| NotEqual | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| NonMaxSupppression | | ✅ | | | | | | | | | | | | | | | | | +| NonZero | | | | | | ✅ | | | | | | | | | | | | | +| OneHot | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| OnesLike | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| PadFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| PartialFusion | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| PowFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | |✅ | | | | | | | +| PowerGrad | | ✅ | | | | | | | | | | | | | | | | | +| PriorBox | | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| PReLUFusion | ✅ | ✅ | | | | | | | | | | | | | | | | | +| QuantDTypeCast | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| RaggedRange | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| RandomNormal | ✅ | ✅ | | | | | | | | | | | | | | | | | +| RandomStandardNormal | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Range | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| Rank | ✅ | ✅ | | | | | | | | | | | | | | | | | +| RealDiv | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Reciprocal | ✅ | ✅ | | ✅ | | | | | | | | | | | | | | | +| ReduceFusion | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| ReduceScatter | | ✅ | | | | | | | | | | | | | | | | | +| Reshape | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | +| Resize | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| ResizeGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| ReverseV2 | | ✅ | ✅ | | | | | | | | | | | | | | | | +| ReverseSequence | | ✅ | | | | | | | | | | | | | | | | | +| ROIPooling | | ✅ | | | | | | | | | | | | | | | | | +| Round | ✅ | ✅ | | ✅ | ✅ | | | ✅ | | | | | | | | | | | +| Rsqrt | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| RsqrtGrad | | ✅ | | | | | | | | | | | | | | | | | +| Select | | ✅ | | | | ✅ | | | | | | | | | | | | | +| Selu | | | | | | | | | | | | | | | | | | | +| ScaleFusion | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| ScatterNd | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| ScatterNdUpdate | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| SGD | | ✅ | | | | | | | | | | | | | | | | | +| Shape | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| SigmoidCroosEntropyWithLogits | | ✅ | | | | | | | | | | | | | | | | | +| SigmoidCroosEntropyWithLogitsGrad | | ✅ | | | | | | | | | | | | | | | | | +| Sin | ✅ | ✅ | | ✅ | ✅ | | | ✅ | | | | | | | | | | | +| Size | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| SliceFusion | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| SkipGram | | ✅ | | | | | | | | | | | | | | | | | +| SmoothL1Loss | | ✅ | | | | | | | | | | | | | | | | | +| SmoothL1LossGrad | | ✅ | | | | | | | | | | | | | | | | | +| Softmax | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| SoftmaxGrad | | ✅ | | | | | | | | | | | | | | | | | +| Softplus | | ✅ | | | | | | | | | | | | | | | | | +| SpaceToBatch | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| SpaceToBatchND | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| SpaceToDepth | ✅ | ✅ | | | | | | | | | | | | | | | | | +| SparseToDense | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| SparseSoftmaxCrossEntropyWithLogits | | ✅ | | | | | | | | | | | | | | | | | +| Splice | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Split | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| SplitWithOverlap | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Sqrt | ✅ | ✅ | | ✅ | ✅ | | | ✅ | | | | | | | | | | | +| SqrtGrad | | ✅ | | | | | | | | | | | | | | | | | +| Square | ✅ | ✅ | | ✅ | ✅ | | | | | | | | | | | | | | +| SquaredDifference | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Squeeze | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| StridedSlice | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| StridedSliceGrad | ✅ | ✅ | | | | | | | | | | | | | | | | | +| Stack | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| SubFusion | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| SubGrad | | ✅ | | | | | | | | | | | | | | | | | +| Switch | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| SwitchLayer | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| TensorListFromTensor | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| TensorListGetItem | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| TensorListReserve | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| TensorListSetItem | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| TensorListStack | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| TensorScatterAdd | | ✅ | ✅ | | | | | | | | | | | | | | | | +| TileFusion | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| TopKFusion | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | | +| Transpose | ✅ | ✅ | ✅ | ✅ | | ✅ | | | |✅ | | | | | | | | | +| UniformReal | | ✅ | ✅ | | | | | | | | | | | | | | | | +| Unique | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| UnsortedSegmentSum | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| Unsqueeze | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | | | | | | | | | | | | | +| Unstack | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | +| Where | ✅ | ✅ | ✅ | | | ✅ | | | | | | | | | | | | | +| ZerosLike | ✅ | ✅ | ✅ | | | | | | | | | | | | | | | | + + +
+ +- 支持不同硬件后端的自定义算子列表: + +
+ +| 操作名
  | 7004 DSP
FP16 | 7004 DSP
FP32 | 7004 DSP
Int8 | 7004 DSP
Cplx64 | 6678e DSP
FP16 | 6678e DSP
FP32 | 6678e DSP
Int8 | 6678e DSP
Cplx64 | +| ----------------------------------- | --------------- | --------------- | --------------- | ----------------- | ---------------- | ---------------- | ---------------- | ------------------ | +| Amzipp | | | |✅ | | | | | +| ArcSin | |✅ | | | | | | | +| AzimuthFFTFFTShift | | | |✅ | | | | | +| AzimuthIFFT | | | |✅ | | | | | +| Bitrev | | | |✅ | | | | | +| ComplexAbs | | | |✅ | | | |✅ | +| Cvmulcv | | | |✅ | | | | | +| CvmulcvIFFT | | | |✅ | | | | | +| FFT_NoBitrev | | | |✅ | | | | | +| FFT_Time | | | |✅ | | | | | +| FFT | | | |✅ | | | |✅ | +| FFTShift | | | |✅ | | | | | +| FourPointInterpolatory | | | |✅ | | | | | +| IFFT_NoBitrev | | | |✅ | | | | | +| IFFT_Time | | | |✅ | | | | | +| IFFT | | | |✅ | | | | | +| PhaseMul | | | |✅ | | | | | +| RangFFT | | | |✅ | | | | | +| Reverse | | | |✅ | | | | | +| Tdpp | |✅ | | | | | | | +| VecAtan | |✅ | | | | | | | +| Cfar | | | | | |✅ | | | + +
\ No newline at end of file diff --git a/master/html/_static/basic.css b/master/html/_static/basic.css index 7ebbd6d..cfc60b8 100644 --- a/master/html/_static/basic.css +++ b/master/html/_static/basic.css @@ -1,5 +1,12 @@ /* + * basic.css + * ~~~~~~~~~ + * * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * */ /* -- main layout ----------------------------------------------------------- */ @@ -108,11 +115,15 @@ img { /* -- search page ----------------------------------------------------------- */ ul.search { - margin-top: 10px; + margin: 10px 0 0 20px; + padding: 0; } ul.search li { - padding: 5px 0; + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; } ul.search li a { @@ -226,10 +237,6 @@ a.headerlink { visibility: hidden; } -a:visited { - color: #551A8B; -} - h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, diff --git a/master/html/_static/doctools.js b/master/html/_static/doctools.js index 0398ebb..d06a71d 100644 --- a/master/html/_static/doctools.js +++ b/master/html/_static/doctools.js @@ -1,5 +1,12 @@ /* + * doctools.js + * ~~~~~~~~~~~ + * * Base JavaScript utilities for all Sphinx HTML documentation. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * */ "use strict"; diff --git a/master/html/_static/documentation_options.js b/master/html/_static/documentation_options.js index 5e92741..27e5d78 100644 --- a/master/html/_static/documentation_options.js +++ b/master/html/_static/documentation_options.js @@ -1,4 +1,5 @@ -const DOCUMENTATION_OPTIONS = { +var DOCUMENTATION_OPTIONS = { + URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), VERSION: 'alpha', LANGUAGE: 'zh-CN', COLLAPSE_INDEX: false, diff --git a/master/html/_static/language_data.js b/master/html/_static/language_data.js index c7fe6c6..250f566 100644 --- a/master/html/_static/language_data.js +++ b/master/html/_static/language_data.js @@ -1,12 +1,19 @@ /* + * language_data.js + * ~~~~~~~~~~~~~~~~ + * * This script contains the language-specific data used by searchtools.js, * namely the list of stopwords, stemmer, scorer and splitter. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * */ var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"]; -/* Non-minified version is copied as a separate JS file, if available */ +/* Non-minified version is copied as a separate JS file, is available */ /** * Porter Stemmer diff --git a/master/html/_static/searchtools.js b/master/html/_static/searchtools.js index 2c774d1..97d56a7 100644 --- a/master/html/_static/searchtools.js +++ b/master/html/_static/searchtools.js @@ -1,5 +1,12 @@ /* + * searchtools.js + * ~~~~~~~~~~~~~~~~ + * * Sphinx JavaScript utilities for the full-text search. + * + * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * */ "use strict"; @@ -13,7 +20,7 @@ if (typeof Scorer === "undefined") { // and returns the new score. /* score: result => { - const [docname, title, anchor, descr, score, filename, kind] = result + const [docname, title, anchor, descr, score, filename] = result return score }, */ @@ -40,14 +47,6 @@ if (typeof Scorer === "undefined") { }; } -// Global search result kind enum, used by themes to style search results. -class SearchResultKind { - static get index() { return "index"; } - static get object() { return "object"; } - static get text() { return "text"; } - static get title() { return "title"; } -} - const _removeChildren = (element) => { while (element && element.lastChild) element.removeChild(element.lastChild); }; @@ -58,20 +57,16 @@ const _removeChildren = (element) => { const _escapeRegExp = (string) => string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string -const _displayItem = (item, searchTerms, highlightTerms) => { +const _displayItem = (item, searchTerms) => { const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT; const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; - const contentRoot = document.documentElement.dataset.content_root; - const [docName, title, anchor, descr, score, _filename, kind] = item; + const [docName, title, anchor, descr, score, _filename] = item; let listItem = document.createElement("li"); - // Add a class representing the item's type: - // can be used by a theme's CSS selector for styling - // See SearchResultKind for the class names. - listItem.classList.add(`kind-${kind}`); let requestUrl; let linkUrl; if (docBuilder === "dirhtml") { @@ -80,35 +75,28 @@ const _displayItem = (item, searchTerms, highlightTerms) => { if (dirname.match(/\/index\/$/)) dirname = dirname.substring(0, dirname.length - 6); else if (dirname === "index/") dirname = ""; - requestUrl = contentRoot + dirname; + requestUrl = docUrlRoot + dirname; linkUrl = requestUrl; } else { // normal html builders - requestUrl = contentRoot + docName + docFileSuffix; + requestUrl = docUrlRoot + docName + docFileSuffix; linkUrl = docName + docLinkSuffix; } let linkEl = listItem.appendChild(document.createElement("a")); linkEl.href = linkUrl + anchor; linkEl.dataset.score = score; linkEl.innerHTML = title; - if (descr) { + if (descr) listItem.appendChild(document.createElement("span")).innerHTML = " (" + descr + ")"; - // highlight search terms in the description - if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js - highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); - } else if (showSearchSummary) fetch(requestUrl) .then((responseData) => responseData.text()) .then((data) => { if (data) listItem.appendChild( - Search.makeSearchSummary(data, searchTerms, anchor) + Search.makeSearchSummary(data, searchTerms) ); - // highlight search terms in the summary - if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js - highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); }); Search.output.appendChild(listItem); }; @@ -120,46 +108,27 @@ const _finishSearch = (resultCount) => { "Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories." ); else - Search.status.innerText = Documentation.ngettext( - "Search finished, found one page matching the search query.", - "Search finished, found ${resultCount} pages matching the search query.", - resultCount, - ).replace('${resultCount}', resultCount); + Search.status.innerText = _( + `Search finished, found ${resultCount} page(s) matching the search query.` + ); }; const _displayNextItem = ( results, resultCount, - searchTerms, - highlightTerms, + searchTerms ) => { // results left, load the summary and display it // this is intended to be dynamic (don't sub resultsCount) if (results.length) { - _displayItem(results.pop(), searchTerms, highlightTerms); + _displayItem(results.pop(), searchTerms); setTimeout( - () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + () => _displayNextItem(results, resultCount, searchTerms), 5 ); } // search finished, update title and status message else _finishSearch(resultCount); }; -// Helper function used by query() to order search results. -// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. -// Order the results by score (in opposite order of appearance, since the -// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. -const _orderResultsByScoreThenName = (a, b) => { - const leftScore = a[4]; - const rightScore = b[4]; - if (leftScore === rightScore) { - // same score: sort alphabetically - const leftTitle = a[1].toLowerCase(); - const rightTitle = b[1].toLowerCase(); - if (leftTitle === rightTitle) return 0; - return leftTitle > rightTitle ? -1 : 1; // inverted is intentional - } - return leftScore > rightScore ? 1 : -1; -}; /** * Default splitQuery function. Can be overridden in ``sphinx.search`` with a @@ -183,26 +152,13 @@ const Search = { _queued_query: null, _pulse_status: -1, - htmlToText: (htmlString, anchor) => { + htmlToText: (htmlString) => { const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); - for (const removalQuery of [".headerlink", "script", "style"]) { - htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); - } - if (anchor) { - const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); - if (anchorContent) return anchorContent.textContent; - - console.warn( - `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` - ); - } - - // if anchor not specified or not found, fall back to main content + htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() }); const docContent = htmlElement.querySelector('[role="main"]'); - if (docContent) return docContent.textContent; - + if (docContent !== undefined) return docContent.textContent; console.warn( - "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + "Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template." ); return ""; }, @@ -255,7 +211,6 @@ const Search = { searchSummary.classList.add("search-summary"); searchSummary.innerText = ""; const searchList = document.createElement("ul"); - searchList.setAttribute("role", "list"); searchList.classList.add("search"); const out = document.getElementById("search-results"); @@ -276,7 +231,16 @@ const Search = { else Search.deferQuery(query); }, - _parseQuery: (query) => { + /** + * execute search (requires search index to be loaded) + */ + query: (query) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + const allTitles = Search._index.alltitles; + const indexEntries = Search._index.indexentries; + // stem the search terms and add them to the correct list const stemmer = new Stemmer(); const searchTerms = new Set(); @@ -312,40 +276,22 @@ const Search = { // console.info("required: ", [...searchTerms]); // console.info("excluded: ", [...excludedTerms]); - return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; - }, - - /** - * execute search (requires search index to be loaded) - */ - _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { - const filenames = Search._index.filenames; - const docNames = Search._index.docnames; - const titles = Search._index.titles; - const allTitles = Search._index.alltitles; - const indexEntries = Search._index.indexentries; - - // Collect multiple result groups to be sorted separately and then ordered. - // Each is an array of [docname, title, anchor, descr, score, filename, kind]. - const normalResults = []; - const nonMainIndexResults = []; - + // array of [docname, title, anchor, descr, score, filename] + let results = []; _removeChildren(document.getElementById("search-progress")); - const queryLower = query.toLowerCase().trim(); + const queryLower = query.toLowerCase(); for (const [title, foundTitles] of Object.entries(allTitles)) { - if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) { for (const [file, id] of foundTitles) { - const score = Math.round(Scorer.title * queryLower.length / title.length); - const boost = titles[file] === title ? 1 : 0; // add a boost for document titles - normalResults.push([ + let score = Math.round(100 * queryLower.length / title.length) + results.push([ docNames[file], titles[file] !== title ? `${titles[file]} > ${title}` : title, id !== null ? "#" + id : "", null, - score + boost, + score, filenames[file], - SearchResultKind.title, ]); } } @@ -354,48 +300,46 @@ const Search = { // search for explicit entries in index directives for (const [entry, foundEntries] of Object.entries(indexEntries)) { if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) { - for (const [file, id, isMain] of foundEntries) { - const score = Math.round(100 * queryLower.length / entry.length); - const result = [ + for (const [file, id] of foundEntries) { + let score = Math.round(100 * queryLower.length / entry.length) + results.push([ docNames[file], titles[file], id ? "#" + id : "", null, score, filenames[file], - SearchResultKind.index, - ]; - if (isMain) { - normalResults.push(result); - } else { - nonMainIndexResults.push(result); - } + ]); } } } // lookup as object objectTerms.forEach((term) => - normalResults.push(...Search.performObjectSearch(term, objectTerms)) + results.push(...Search.performObjectSearch(term, objectTerms)) ); // lookup as search terms in fulltext - normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + results.push(...Search.performTermsSearch(searchTerms, excludedTerms)); // let the scorer override scores with a custom scoring function - if (Scorer.score) { - normalResults.forEach((item) => (item[4] = Scorer.score(item))); - nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); - } + if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item))); - // Sort each group of results by score and then alphabetically by name. - normalResults.sort(_orderResultsByScoreThenName); - nonMainIndexResults.sort(_orderResultsByScoreThenName); - - // Combine the result groups in (reverse) order. - // Non-main index entries are typically arbitrary cross-references, - // so display them after other results. - let results = [...nonMainIndexResults, ...normalResults]; + // now sort the results by score (in opposite order of appearance, since the + // display function below uses pop() to retrieve items) and then + // alphabetically + results.sort((a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; + }); // remove duplicate search results // note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept @@ -409,19 +353,14 @@ const Search = { return acc; }, []); - return results.reverse(); - }, - - query: (query) => { - const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); - const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + results = results.reverse(); // for debugging //Search.lastresults = results.slice(); // a copy // console.info("search results:", Search.lastresults); // print the results - _displayNextItem(results, results.length, searchTerms, highlightTerms); + _displayNextItem(results, results.length, searchTerms); }, /** @@ -485,7 +424,6 @@ const Search = { descr, score, filenames[match[0]], - SearchResultKind.object, ]); }; Object.keys(objects).forEach((prefix) => @@ -520,18 +458,14 @@ const Search = { // add support for partial matches if (word.length > 2) { const escapedWord = _escapeRegExp(word); - if (!terms.hasOwnProperty(word)) { - Object.keys(terms).forEach((term) => { - if (term.match(escapedWord)) - arr.push({ files: terms[term], score: Scorer.partialTerm }); - }); - } - if (!titleTerms.hasOwnProperty(word)) { - Object.keys(titleTerms).forEach((term) => { - if (term.match(escapedWord)) - arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); - }); - } + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord) && !terms[word]) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord) && !titleTerms[word]) + arr.push({ files: titleTerms[word], score: Scorer.partialTitle }); + }); } // no match but word was a required one @@ -554,8 +488,9 @@ const Search = { // create the mapping files.forEach((file) => { - if (!fileMap.has(file)) fileMap.set(file, [word]); - else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1) + fileMap.get(file).push(word); + else fileMap.set(file, [word]); }); }); @@ -596,7 +531,6 @@ const Search = { null, score, filenames[file], - SearchResultKind.text, ]); } return results; @@ -607,8 +541,8 @@ const Search = { * search summary for a given text. keywords is a list * of stemmed words. */ - makeSearchSummary: (htmlText, keywords, anchor) => { - const text = Search.htmlToText(htmlText, anchor); + makeSearchSummary: (htmlText, keywords) => { + const text = Search.htmlToText(htmlText); if (text === "") return null; const textLower = text.toLowerCase(); diff --git a/master/html/_static/sphinx_highlight.js b/master/html/_static/sphinx_highlight.js index 8a96c69..aae669d 100644 --- a/master/html/_static/sphinx_highlight.js +++ b/master/html/_static/sphinx_highlight.js @@ -29,19 +29,14 @@ const _highlight = (node, addItems, text, className) => { } span.appendChild(document.createTextNode(val.substr(pos, text.length))); - const rest = document.createTextNode(val.substr(pos + text.length)); parent.insertBefore( span, parent.insertBefore( - rest, + document.createTextNode(val.substr(pos + text.length)), node.nextSibling ) ); node.nodeValue = val.substr(0, pos); - /* There may be more occurrences of search term in this node. So call this - * function recursively on the remaining fragment. - */ - _highlight(rest, addItems, text, className); if (isInSVG) { const rect = document.createElementNS( @@ -145,10 +140,5 @@ const SphinxHighlight = { }, }; -_ready(() => { - /* Do not call highlightSearchWords() when we are on the search page. - * It will highlight words from the *previous* search query. - */ - if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); - SphinxHighlight.initEscapeListener(); -}); +_ready(SphinxHighlight.highlightSearchWords); +_ready(SphinxHighlight.initEscapeListener); diff --git a/master/html/_static/table.css b/master/html/_static/table.css new file mode 100644 index 0000000..9327237 --- /dev/null +++ b/master/html/_static/table.css @@ -0,0 +1,168 @@ +/* 重置所有表格相关样式,确保我们的样式优先级 */ +.scrollable-table-container * { + box-sizing: border-box; +} + +/* 表格容器样式 */ +.scrollable-table-container { + height: 390px; + overflow: scroll; + margin-bottom: 1em; + border: 1px solid #ddd; + position: relative; + background-color: #fff; + isolation: isolate; + /* 启用GPU加速 */ + transform: translateZ(0); + -webkit-transform: translateZ(0); +} + +/* 确保表格占据全部宽度 */ +.scrollable-table-container table { + width: 100%; + border-collapse: separate; + border-spacing: 0; + table-layout: fixed; + margin: 0; +} + +/* 表头单元格样式 - 提高z-index并确保背景色 */ +.scrollable-table-container thead th { + position: sticky; + top: 0; + z-index: 200; + background-color: #f8f8f8 !important; + border-bottom: 2px solid #ddd; + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + padding: 8px 12px; + text-align: left; + font-weight: bold; + /* 启用GPU加速 */ + transform: translateZ(0); + -webkit-transform: translateZ(0); + /* 移除will-change,它可能导致性能问题 */ + will-change: auto; +} + +/* 表格单元格样式 */ +.scrollable-table-container td { + padding: 8px 12px; + text-align: left; + border: 1px solid #ddd; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + background-color: #fff; + position: relative; + z-index: 1; +} + +/* 固定首列样式 - 提高z-index并确保背景色 */ +.scrollable-table-container td:first-child { + position: sticky; + left: 0; + z-index: 150; + background-color: #fff !important; + border-right: 2px solid #ddd; + box-shadow: 2px 0 4px rgba(0, 0, 0, 0.1); + min-width: 150px; + /* 启用GPU加速 */ + transform: translateZ(0); + -webkit-transform: translateZ(0); + /* 移除will-change,它可能导致性能问题 */ + will-change: auto; +} + +/* 固定表头的首列(左上角单元格) - 最高优先级 */ +.scrollable-table-container thead th:first-child { + position: sticky; + left: 0; + z-index: 250; + background-color: #f8f8f8 !important; + box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); + min-width: 150px; + /* 启用GPU加速 */ + transform: translateZ(0); + -webkit-transform: translateZ(0); + /* 移除will-change,它可能导致性能问题 */ + will-change: auto; +} + +/* 使用!important确保固定元素的背景色不被覆盖 */ +.scrollable-table-container thead th { + background-color: #f8f8f8 !important; +} + +.scrollable-table-container td:first-child { + background-color: #fff !important; +} + +.scrollable-table-container thead th:first-child { + background-color: #f8f8f8 !important; +} + +/* 响应式调整 */ +@media screen and (max-width: 768px) { + .scrollable-table-container { + height: 300px; + } + + .scrollable-table-container td:first-child, + .scrollable-table-container th:first-child { + min-width: 120px; + } +} + +/* 为表格内容区域添加轻微背景色,增强可读性 */ +.scrollable-table-container tbody tr:nth-child(even) { + background-color: #f9f9f9; +} + +.scrollable-table-container tbody tr:hover { + background-color: #f0f0f0; +} + +/* 针对Chrome的优化 */ +@media screen and (-webkit-min-device-pixel-ratio:0) { + .scrollable-table-container { + /* Chrome特定优化 */ + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + } + + .scrollable-table-container thead th, + .scrollable-table-container td:first-child, + .scrollable-table-container thead th:first-child { + /* Chrome特定优化 */ + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + } +} + +/* 强制滚动条样式 */ +.scrollable-table-container::-webkit-scrollbar { + height: 12px; + width: 12px; + -webkit-appearance: none; +} + +.scrollable-table-container::-webkit-scrollbar-track { + background: #f1f1f1; + border-radius: 6px; +} + +.scrollable-table-container::-webkit-scrollbar-thumb { + background: #c1c1c1; + border-radius: 6px; + border: 2px solid #f1f1f1; +} + +.scrollable-table-container::-webkit-scrollbar-thumb:hover { + background: #a8a8a8; +} + +/* 针对Firefox的滚动条样式 */ +.scrollable-table-container { + scrollbar-width: thin; + scrollbar-color: #c1c1c1 #f1f1f1; +} \ No newline at end of file diff --git a/master/html/_static/table.js b/master/html/_static/table.js new file mode 100644 index 0000000..047cae1 --- /dev/null +++ b/master/html/_static/table.js @@ -0,0 +1,131 @@ +document.addEventListener('DOMContentLoaded', function() { + // 等待页面完全加载和渲染 + setTimeout(initializeFixedTables, 500); + }); + + // 初始化所有固定表格 + function initializeFixedTables() { + // 查找所有需要固定效果的表格容器 + const tableContainers = document.querySelectorAll('.scrollable-table-container'); + + if (tableContainers.length === 0) { + console.warn('未找到.scrollable-table-container元素'); + return; + } + + tableContainers.forEach((container, index) => { + // 检查是否已初始化 + if (container.dataset.initialized === 'true') { + return; + } + + // 获取表格 + const table = container.querySelector('table'); + if (!table) { + console.warn('容器中未找到表格元素', container); + return; + } + + // 确保表格有正确的结构 + ensureTableStructure(table); + + // 应用固定效果 + applyFixedEffects(container, table); + + // 标记为已初始化 + container.dataset.initialized = 'true'; + console.log(`表格 ${index + 1} 初始化完成`); + }); + } + + // 确保表格有正确的结构 + function ensureTableStructure(table) { + // 如果没有thead,尝试从第一行创建 + if (!table.tHead || table.tHead.rows.length === 0) { + const firstRow = table.rows[0]; + if (firstRow) { + const thead = document.createElement('thead'); + thead.appendChild(firstRow.cloneNode(true)); + table.insertBefore(thead, table.firstChild); + firstRow.remove(); + } + } + + // 如果没有tbody,创建它 + if (!table.tBodies || table.tBodies.length === 0) { + const tbody = document.createElement('tbody'); + while (table.rows.length > 1) { // 假设第一行是表头 + tbody.appendChild(table.rows[1]); + } + table.appendChild(tbody); + } + } + + // 应用固定效果 + function applyFixedEffects(container, table) { + // 设置表格和列的宽度 + setTableLayout(container, table); + + // 添加滚动事件监听器,确保固定效果 + container.addEventListener('scroll', function() { + // 这个事件监听器确保固定效果在滚动时保持 + // 实际上,CSS的sticky定位应该已经处理了这一点 + // 这里主要是为了确保在某些浏览器中触发重绘 + const thElements = table.querySelectorAll('thead th'); + thElements.forEach(th => { + th.style.transform = `translateY(${container.scrollTop}px)`; + }); + }); + + // 监听窗口大小变化,重新调整布局 + window.addEventListener('resize', function() { + setTimeout(() => setTableLayout(container, table), 100); + }); + } + + // 设置表格布局 + function setTableLayout(container, table) { + // 设置表格宽度 + table.style.width = '100%'; + + // 设置列宽 + const headerCells = table.tHead.rows[0].cells; + const containerWidth = container.offsetWidth; + + // 首列宽度 + if (headerCells.length > 0) { + headerCells[0].style.minWidth = '270px'; + headerCells[0].style.width = '270px'; + } + + // 其他列平均分配剩余宽度 + const remainingWidth = containerWidth - 270; + const otherColumnsWidth = Math.max(80, remainingWidth / (headerCells.length - 1)); + + for (let i = 1; i < headerCells.length; i++) { + headerCells[i].style.minWidth = `${otherColumnsWidth}px`; + headerCells[i].style.width = `${otherColumnsWidth}px`; + } + + // 确保表体和表头列宽一致 + if (table.tBodies.length > 0 && table.tBodies[0].rows.length > 0) { + const bodyCells = table.tBodies[0].rows[0].cells; + for (let i = 0; i < bodyCells.length; i++) { + if (i < headerCells.length) { + bodyCells[i].style.width = headerCells[i].style.width; + bodyCells[i].style.minWidth = headerCells[i].style.minWidth; + } + } + } + } + + // 如果页面是通过AJAX等方式动态加载的,可以使用这个函数重新初始化 + function reinitializeFixedTables() { + document.querySelectorAll('.scrollable-table-container').forEach(container => { + container.dataset.initialized = 'false'; + }); + initializeFixedTables(); + } + + // 导出函数到全局作用域,以便在需要时手动调用 + window.reinitializeFixedTables = reinitializeFixedTables; \ No newline at end of file diff --git a/master/html/appdevelop/convertmodel.html b/master/html/appdevelop/convertmodel.html index 752b2b0..84b7946 100644 --- a/master/html/appdevelop/convertmodel.html +++ b/master/html/appdevelop/convertmodel.html @@ -1,7 +1,7 @@ - + @@ -9,14 +9,16 @@ 转换模型 — MindSpore Signal+ 使用手册 alpha 文档 + - - - + + + + @@ -81,7 +83,7 @@
-

转换模型

+

转换模型

1.xxx 2.xxx 3.xxx

diff --git a/master/html/appdevelop/createmodel.html b/master/html/appdevelop/createmodel.html index 43cc257..28fc7ed 100644 --- a/master/html/appdevelop/createmodel.html +++ b/master/html/appdevelop/createmodel.html @@ -1,7 +1,7 @@ - + @@ -9,14 +9,16 @@ 定义模型 — MindSpore Signal+ 使用手册 alpha 文档 + - - - + + + + @@ -81,7 +83,7 @@
-

定义模型

+

定义模型

1.xxx 2.xxx 3.xxx

diff --git a/master/html/appdevelop/index.html b/master/html/appdevelop/index.html index 174adc7..60fec89 100644 --- a/master/html/appdevelop/index.html +++ b/master/html/appdevelop/index.html @@ -1,7 +1,7 @@ - + @@ -9,14 +9,16 @@ 应用开发 — MindSpore Signal+ 使用手册 alpha 文档 + - - - + + + + @@ -80,7 +82,7 @@
-

应用开发

+

应用开发

  • 定义模型
  • diff --git a/master/html/appdevelop/inference.html b/master/html/appdevelop/inference.html index 9f7142d..a9d5a02 100644 --- a/master/html/appdevelop/inference.html +++ b/master/html/appdevelop/inference.html @@ -1,7 +1,7 @@ - + @@ -9,14 +9,16 @@ 模型部署 — MindSpore Signal+ 使用手册 alpha 文档 + - - - + + + + @@ -81,7 +83,7 @@
    -

    模型部署

    +

    模型部署

    1.xxx 2.xxx 3.xxx

    diff --git a/master/html/functionlib/dsplib/add.html b/master/html/functionlib/dsplib/add.html index 721456f..ae58b51 100644 --- a/master/html/functionlib/dsplib/add.html +++ b/master/html/functionlib/dsplib/add.html @@ -1,7 +1,7 @@ - + @@ -9,18 +9,20 @@ Add — MindSpore Signal+ 使用手册 alpha 文档 + - - - + + + + - + @@ -50,7 +52,9 @@
  • 算子库支持情况
  • DSP Library C API Reference
@@ -85,11 +89,11 @@
-

Add

+

Add

共享存储版本:

-int my_c_add_anycore(int *param1, int *param2)
+int my_c_add_anycore(int *param1, int *param2)

两个输入Tensor逐元素相加。

输入:
    @@ -124,7 +128,7 @@

    私有存储版本:

    -int my_c_add_1core(int *param1, int *param2)
    +int my_c_add_1core(int *param1, int *param2)

    两个输入Tensor逐元素相加。

    输入:
      @@ -163,7 +167,7 @@