Skip to content

Implemented SIGNUM function kernel#43

Open
gkethamallax wants to merge 3 commits intomasterfrom
feature/signum_kernel
Open

Implemented SIGNUM function kernel#43
gkethamallax wants to merge 3 commits intomasterfrom
feature/signum_kernel

Conversation

@gkethamallax
Copy link
Copy Markdown

FPGA Log:

root@agilex7_dk_si_agf014ea:/tsi/ganesh/work# ./run_llama.sh
load_model: using TSavorite backend

Calculating mem_size 384 2 and creating ggml context

Creating input Tensor

Creating Backend Buffer

Loading Input Tensor Data to Backend Buffer

Bringing tensor data from Backend buffer and printing 32 tensor data:
[ 1.10 2.30 3.20 4.00 5.00 6.00 7.00 8.00 9.00 10.00 11.00 12.00 13.00 14.00 15.00 16.00 17.00 18.00 19.00 20.00 21.00 22.00 23.00 24.00 25.00 26.00 27.00 28.00 29.00 30.00 31.00 32.00 ]
main: compute buffer size: 0.2500 KB

Under Test case for compute API creating build_graph

Compute Done

operation type: 0, num of elements 32

compute is also done

TEST CASE PASSED

GGML Tsavorite Profiling Results:

Calls Total(ms) T/call Self(ms) Function

1    30.9820   30.9820      4.3060  [ 1.49%] [Thread] GGML Tsavorite 
1    26.6760   26.6760     22.3030  └─ [ 1.28%] tsi::runtime::TsavRTFPGA::initialize
1     2.9910    2.9910      2.9910    └─ [1.44e-01%] tsi::runtime::TsavRTFPGA::initializeQueues
1     0.9980    0.9980      0.9980    └─ [4.80e-02%] tsi::runtime::TsavRT::initialize
1     0.3840    0.3840      0.3500    └─ [1.85e-02%] tsi::runtime::TsavRTFPGA::sendNOPTestCommand
2     0.0340    0.0170      0.0340      └─ [1.63e-03%] tsi::runtime::executeWithTimeout

[Thread] tsi::runtime::TsavRT::awaitCommandListCompletion (cumulative over all threads)

1     1.4070    1.4070      0.0000  [6.77e-02%] [Thread] tsi::runtime::TsavRT::awaitCommandListCompletion
1    21.0506   21.0506     21.0506  └─ [ 1.01%] TXE 0 Idle
1     0.1633    0.1633      0.1633  └─ [7.85e-03%] [ txe_add ]

[Thread] tsi::runtime::TsavRT::finalizeCommandList (cumulative over all threads)

1     0.7080    0.7080      0.7000  [3.40e-02%] [Thread] tsi::runtime::TsavRT::finalizeCommandList
1     0.0080    0.0080      0.0080  └─ [3.85e-04%] tsi::runtime::executeWithTimeout

[Thread] tsi::runtime::TsavRT::processResponses (cumulative over all threads)

1     0.2550    0.2550      0.2440  [1.23e-02%] [Thread] tsi::runtime::TsavRT::processResponses
1     0.0110    0.0110      0.0110  └─ [5.29e-04%] tsi::runtime::executeWithTimeout

[Thread] tsi::runtime::TsavRTFPGA::finalize (cumulative over all threads)

1    35.4020   35.4020     34.8570  [ 1.70%] [Thread] tsi::runtime::TsavRTFPGA::finalize
1     0.5450    0.5450      0.5450  └─ [2.62e-02%] tsi::runtime::TsavRTFPGA::releaseTxes

[Thread] tsi::runtime::TsavRT::allocate (cumulative over all threads)

3     0.1390    0.0463      0.1390  [6.68e-03%] [Thread] tsi::runtime::TsavRT::allocate

[Thread] tsi::runtime::TsavRTFPGA::loadBlob (cumulative over all threads)

1     3.3130    3.3130      3.3130  [1.59e-01%] [Thread] tsi::runtime::TsavRTFPGA::loadBlob

[Thread] tsi::runtime::TsavRT::addCommandToList (cumulative over all threads)

1     0.6320    0.6320      0.6320  [3.04e-02%] [Thread] tsi::runtime::TsavRT::addCommandToList

[Thread] tsi::runtime::TsavRTFPGA::unloadBlob (cumulative over all threads)

1     0.0430    0.0430      0.0430  [2.07e-03%] [Thread] tsi::runtime::TsavRTFPGA::unloadBlob

[Thread] tsi::runtime::TsavRT::deallocate (cumulative over all threads)

1     0.0210    0.0210      0.0210  [1.01e-03%] [Thread] tsi::runtime::TsavRT::deallocate

========================================================================================================================
- 2079.6420 0.0000 2079.6420 [100.00%] TOTAL

Counter Metrics:

Metric Min Max Avg

Queue_0_Occupancy 0.0000 1.0000 0.3333

root@agilex7_dk_si_agf014ea:/tsi/ganesh/work#

Signed-off-by: Ganesh Kethamalla <gkethamallax@tsavoritesi.com>
Signed-off-by: Ganesh Kethamalla <gkethamallax@tsavoritesi.com>
Copy link
Copy Markdown

@atrivedi-tsavoritesi atrivedi-tsavoritesi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A minor comment and other changes look good.


{0.891207, -0.951602, -0.544021, -0.958924, -0.958924, -0.279416, 0.656987, 0.989358, 0.412118, -0.544021, -0.999990, -0.536573, 0.420167, 0.990607, 0.650288, -0.287903, -0.961398, -0.750987, 0.149877, 0.912945, 0.912945, 0.912945, -0.846220, -0.905578, -0.132352, 0.762559, 0.956376, 0.270906, -0.663634, -0.988032, -0.404039, 0.926149},
//SGN Kernel
{-1, -1, -1, 0, 1, 1, 1, 1, -1, 1, -1, 0, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the results always -1 or 1 ?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes ashish, signum function have -1, 0, or 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants