Skip to content

Commit 59aa2bd

Browse files
committed
+add Base implementation of function SynetSoftmax16b.
1 parent 0032054 commit 59aa2bd

20 files changed

Lines changed: 406 additions & 50 deletions

docs/2026.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ <h5>New features</h5>
4747
<li>Parameter 'params' to function SimdSynetInnerProduct16bSetParams.</li>
4848
<li>Base implementation of class SynetGatherElements.</li>
4949
<li>Base implementation, SSE4.1, AVX2, AVX-512BW optimizations of function SynetNormalizeLayerForward16bV2.</li>
50+
<li>Base implementation of function SynetSoftmax16b.</li>
5051
</ul>
5152
<h5>Improving</h5>
5253
<ul>
@@ -75,12 +76,17 @@ <h5>Bug fixing</h5>
7576
<li>Compiler error in assert conditions in function Simd::DeinterleaveRgba.</li>
7677
<li>Compiler error in assert conditions in function Simd::GetObjectMoments.</li>
7778
</ul>
79+
<h5>Renaming</h5>
80+
<ul>
81+
<li>Function SynetSoftmaxLayerForward to SynetSoftmax32f.</li>
82+
</ul>
7883

7984
<h4>Test framework</h4>
8085
<h5>New features</h5>
8186
<ul>
8287
<li>Tests for verifying functionality of class SynetGatherElements.</li>
8388
<li>Tests for verifying functionality of function SynetNormalizeLayerForward16bV2.</li>
89+
<li>Tests for verifying functionality of function SynetSoftmax16b.</li>
8490
</ul>
8591

8692
<h3 id="R159">March 3, 2026 (version 6.2.159)</h3>

docs/help/group__synet__other.html

Lines changed: 71 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

prj/vs2022/Base.vcxproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,8 @@
260260
<ClCompile Include="..\..\src\Simd\SimdBaseSynetQuantizeLinear.cpp" />
261261
<ClCompile Include="..\..\src\Simd\SimdBaseSynetScale.cpp" />
262262
<ClCompile Include="..\..\src\Simd\SimdBaseSynetScale16b.cpp" />
263-
<ClCompile Include="..\..\src\Simd\SimdBaseSynetSoftmax.cpp" />
263+
<ClCompile Include="..\..\src\Simd\SimdBaseSynetSoftmax16b.cpp" />
264+
<ClCompile Include="..\..\src\Simd\SimdBaseSynetSoftmax32f.cpp" />
264265
<ClCompile Include="..\..\src\Simd\SimdBaseSynetUnaryOperation.cpp" />
265266
<ClCompile Include="..\..\src\Simd\SimdBaseTexture.cpp" />
266267
<ClCompile Include="..\..\src\Simd\SimdBaseThread.cpp" />

prj/vs2022/Base.vcxproj.filters

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,6 @@
397397
<ClCompile Include="..\..\src\Simd\SimdBaseSynetScale16b.cpp">
398398
<Filter>Base\Synet\Other</Filter>
399399
</ClCompile>
400-
<ClCompile Include="..\..\src\Simd\SimdBaseSynetSoftmax.cpp">
401-
<Filter>Base\Synet\Other</Filter>
402-
</ClCompile>
403400
<ClCompile Include="..\..\src\Simd\SimdBaseSynetUnaryOperation.cpp">
404401
<Filter>Base\Synet\Other</Filter>
405402
</ClCompile>
@@ -466,6 +463,12 @@
466463
<ClCompile Include="..\..\src\Simd\SimdBaseSynetNormalize32f.cpp">
467464
<Filter>Base\Synet\Normalize</Filter>
468465
</ClCompile>
466+
<ClCompile Include="..\..\src\Simd\SimdBaseSynetSoftmax16b.cpp">
467+
<Filter>Base\Synet\Softmax</Filter>
468+
</ClCompile>
469+
<ClCompile Include="..\..\src\Simd\SimdBaseSynetSoftmax32f.cpp">
470+
<Filter>Base\Synet\Softmax</Filter>
471+
</ClCompile>
469472
</ItemGroup>
470473
<ItemGroup>
471474
<ClInclude Include="..\..\src\Simd\SimdBase.h">
@@ -836,5 +839,8 @@
836839
<Filter Include="Base\Synet\Normalize">
837840
<UniqueIdentifier>{bf9837b2-f448-4cc4-bada-d0ff75e6da4e}</UniqueIdentifier>
838841
</Filter>
842+
<Filter Include="Base\Synet\Softmax">
843+
<UniqueIdentifier>{c4df5a95-1cea-4d8d-aa1d-94813a69eb18}</UniqueIdentifier>
844+
</Filter>
839845
</ItemGroup>
840846
</Project>

src/Simd/SimdAvx2.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ namespace Simd
567567

568568
void SynetSigmoid32f(const float* src, size_t size, const float* slope, float* dst);
569569

570-
void SynetSoftmaxLayerForward(const float * src, size_t outer, size_t size, size_t inner, float * dst);
570+
void SynetSoftmax32f(const float * src, size_t outer, size_t size, size_t inner, float * dst);
571571

572572
void SynetSoftplus32f(const float* src, size_t size, const float* beta, const float* threshold, float* dst);
573573

src/Simd/SimdAvx2SynetSoftmax.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ namespace Simd
276276
}
277277
}
278278

279-
void SynetSoftmaxLayerForward(const float * src, size_t outer, size_t count, size_t inner, float * dst)
279+
void SynetSoftmax32f(const float * src, size_t outer, size_t count, size_t inner, float * dst)
280280
{
281281
if (inner == 1)
282282
{

src/Simd/SimdAvx512bw.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ namespace Simd
563563

564564
void SynetSigmoid32f(const float* src, size_t size, const float* slope, float* dst);
565565

566-
void SynetSoftmaxLayerForward(const float* src, size_t outer, size_t size, size_t inner, float* dst);
566+
void SynetSoftmax32f(const float* src, size_t outer, size_t size, size_t inner, float* dst);
567567

568568
void SynetSoftplus32f(const float* src, size_t size, const float* beta, const float* threshold, float* dst);
569569

src/Simd/SimdAvx512bwSynetSoftmax.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ namespace Simd
498498
}
499499
}
500500

501-
void SynetSoftmaxLayerForward(const float* src, size_t outer, size_t count, size_t inner, float* dst)
501+
void SynetSoftmax32f(const float* src, size_t outer, size_t count, size_t inner, float* dst)
502502
{
503503
if (inner == 1)
504504
{

src/Simd/SimdBase.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,9 @@ namespace Simd
637637

638638
void SynetSigmoid32f(const float* src, size_t size, const float* slope, float* dst);
639639

640-
void SynetSoftmaxLayerForward(const float * src, size_t outer, size_t size, size_t inner, float * dst);
640+
void SynetSoftmax32f(const float * src, size_t outer, size_t size, size_t inner, float * dst);
641+
642+
void SynetSoftmax16b(const uint16_t* src, size_t outer, size_t count, size_t inner, uint16_t* dst);
641643

642644
void SynetSoftplus32f(const float* src, size_t size, const float* beta, const float* threshold, float* dst);
643645

0 commit comments

Comments
 (0)