-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[VTA][Chisel] Change Scala Linter scalafmt => scalastyle #4998
Conversation
Change-Id: Ifc590e7cb63585f35dfdc9efcf3c6287b1afb1dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this @liangfu ! LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great!
Change-Id: I8aff2632dadda05d2896e28bdaf6f780a160a15a
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @liangfu ; let us know when it's ready for a merge. |
@tmoreau89 @vegaluisjose Thanks for the review. I think this is now ready for a merge, and let's wait for the CI testing results. |
Change-Id: Ibeb00c11a5718ea47322ea2b82e757828af8af91
In addition, based on the suggestions in the linter, I made some final changes in fixing indentation errors, here is a typical example: diff --git a/vta/hardware/chisel/src/main/scala/core/Load.scala b/vta/hardware/chisel/src/main/scala/core/Load.scala
index 7c79498bd..50c26bb8e 100644
--- a/vta/hardware/chisel/src/main/scala/core/Load.scala
+++ b/vta/hardware/chisel/src/main/scala/core/Load.scala
@@ -25,12 +25,12 @@ import vta.util.config._
import vta.shell._
/** Load.
- *
- * Load inputs and weights from memory (DRAM) into scratchpads (SRAMs).
- * This module instantiate the TensorLoad unit which is in charge of
- * loading 1D and 2D tensors to scratchpads, so it can be used by
- * other modules such as Compute.
- */
+ *
+ * Load inputs and weights from memory (DRAM) into scratchpads (SRAMs).
+ * This module instantiate the TensorLoad unit which is in charge of
+ * loading 1D and 2D tensors to scratchpads, so it can be used by
+ * other modules such as Compute.
+ */
class Load(debug: Boolean = false)(implicit p: Parameters) extends Module {
val mp = p(ShellKey).memParams
val io = IO(new Bundle {
@@ -110,11 +110,10 @@ class Load(debug: Boolean = false)(implicit p: Parameters) extends Module {
when(dec.io.isSync) {
printf("[Load] start sync\n")
}.elsewhen(dec.io.isInput) {
- printf("[Load] start input\n")
- }
- .elsewhen(dec.io.isWeight) {
- printf("[Load] start weight\n")
- }
+ printf("[Load] start input\n")
+ }.elsewhen(dec.io.isWeight) {
+ printf("[Load] start weight\n")
+ }
}
// done
when(state === sSync) { Please take another look. |
Thanks for the diff @liangfu ; this looks great. |
Looks like CI failed on one of the unit tests |
I think it might related to #4901 , let me trigger the testing pipeline again. |
Thanks @liangfu, @vegaluisjose the PR has been merged! |
* scalafmt => scalastyle Change-Id: Ifc590e7cb63585f35dfdc9efcf3c6287b1afb1dd * scalafmt => scalastyle Change-Id: I8aff2632dadda05d2896e28bdaf6f780a160a15a * add indentation constraint Change-Id: Ibeb00c11a5718ea47322ea2b82e757828af8af91 * trigger ci again
* scalafmt => scalastyle Change-Id: Ifc590e7cb63585f35dfdc9efcf3c6287b1afb1dd * scalafmt => scalastyle Change-Id: I8aff2632dadda05d2896e28bdaf6f780a160a15a * add indentation constraint Change-Id: Ibeb00c11a5718ea47322ea2b82e757828af8af91 * trigger ci again
* scalafmt => scalastyle Change-Id: Ifc590e7cb63585f35dfdc9efcf3c6287b1afb1dd * scalafmt => scalastyle Change-Id: I8aff2632dadda05d2896e28bdaf6f780a160a15a * add indentation constraint Change-Id: Ibeb00c11a5718ea47322ea2b82e757828af8af91 * trigger ci again
As scalafmt changes the code even with
--test
argument in the latest version, this PR switches scala linter for Chisel VTA from scalafmt to scalastyle.@tmoreau89 @vegaluisjose Please review.