Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
da40645f
Commit
da40645f
authored
Jul 27, 2019
by
Luis Vega
Committed by
Thierry Moreau
Jul 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[VTA] [Chisel] fix tensor issue/commit in gemm (#3637)
* fix tensor issue/commit in gemm * remove trailing spaces
parent
786c49f3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
vta/hardware/chisel/src/main/scala/core/TensorGemm.scala
+4
-4
vta/hardware/chisel/src/main/scala/core/TensorStore.scala
+1
-1
vta/tests/hardware/metal_test/metal_test.cc
+2
-2
No files found.
vta/hardware/chisel/src/main/scala/core/TensorGemm.scala
View file @
da40645f
...
...
@@ -39,10 +39,10 @@ class MAC(aBits: Int = 8, bBits: Int = 8, cBits: Int = 16) extends Module {
val
rA
=
RegNext
(
io
.
a
)
val
rB
=
RegNext
(
io
.
b
)
val
rC
=
RegNext
(
io
.
c
)
mult
:=
rA
*
rB
add
:=
rC
+&
mult
io
.
y
:=
add
}
...
...
@@ -226,9 +226,9 @@ class TensorGemm(debug: Boolean = false)(implicit p: Parameters) extends Module
when
(
state
===
sIdle
)
{
inflight
:=
0.
U
}
.
elsewhen
(!
dec
.
reset
)
{
when
(
state
===
s
Exe
&&
inflight
=/=
((
1
<<
pBits
)
-
1
).
asUInt
)
{
// overflow check
when
(
state
===
s
ReadTensor
)
{
// issue a tensor
inflight
:=
inflight
+
1.
U
}
.
elsewhen
(
mvc
.
io
.
acc_o
.
data
.
valid
&&
inflight
=/=
0.
U
)
{
// underflow check
}
.
elsewhen
(
mvc
.
io
.
acc_o
.
data
.
valid
)
{
// commit a tensor
inflight
:=
inflight
-
1.
U
}
}
...
...
vta/hardware/chisel/src/main/scala/core/TensorStore.scala
View file @
da40645f
...
...
@@ -28,7 +28,7 @@ import vta.shell._
*
* Store 1D and 2D tensors from out-scratchpad (SRAM) to main memory (DRAM).
*/
class
TensorStore
(
tensorType
:
String
=
"
tru
e"
,
debug
:
Boolean
=
false
)
class
TensorStore
(
tensorType
:
String
=
"
non
e"
,
debug
:
Boolean
=
false
)
(
implicit
p
:
Parameters
)
extends
Module
{
val
tp
=
new
TensorParams
(
tensorType
)
val
mp
=
p
(
ShellKey
).
memParams
...
...
vta/tests/hardware/metal_test/metal_test.cc
View file @
da40645f
...
...
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment