-
Notifications
You must be signed in to change notification settings - Fork 281
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
Add tensor core to SimX #142
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
99c6a1a
Tensor cores in Vortex
vsinghania99 0e3badf
Script checkin and code cleanup
vsinghania99 a378aed
Moved tc_num, tc_size param to makefile args
nayannair 5b0fc8c
Fixes for PR
nayannair 5e63b8f
dummy commit
nayannair 09028d8
Merge pull request #144 from nayannair/tensor-core
tinebp 4a60606
Merge branch 'develop' into tensor-core
jaewon-lee-github d1175a0
update the code accessing registers in obsoleted way
jaewon-lee-github 6c72597
Merge pull request #184 from vortexgpgpu/develop
jaewon-lee-github b7531c9
support 64bit
jaewon-lee-github File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ static const std::unordered_map<Opcode, InstType> sc_instTable = { | |
{Opcode::EXT2, InstType::R4}, | ||
{Opcode::R_W, InstType::R}, | ||
{Opcode::I_W, InstType::I}, | ||
{Opcode::TCU, InstType::I}, | ||
}; | ||
|
||
enum Constants { | ||
|
@@ -405,6 +406,16 @@ static const char* op_string(const Instr &instr) { | |
default: | ||
std::abort(); | ||
} | ||
|
||
case Opcode::TCU: | ||
switch(func3) | ||
{ | ||
case 0: return "ML"; // Matrix Load | ||
case 1: return "MS"; // Matrix Store | ||
case 2: return "MATMUL"; // Matrix Multiply | ||
default: | ||
std::abort(); | ||
} | ||
default: | ||
std::abort(); | ||
} | ||
|
@@ -548,6 +559,14 @@ std::shared_ptr<Instr> Emulator::decode(uint32_t code) const { | |
|
||
case InstType::I: { | ||
switch (op) { | ||
case Opcode::TCU: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which instruction does this correspond to? |
||
instr->setDestReg(rs1, RegType::Integer); | ||
instr->addSrcReg(rs1, RegType::Integer); | ||
instr->setFunc3(func3); | ||
instr->setFunc7(func7); | ||
auto imm = code >> shift_rs2; | ||
instr->setImm(sext(imm, width_i_imm)); | ||
} break; | ||
case Opcode::I: | ||
case Opcode::I_W: | ||
case Opcode::JALR: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It would be good to document the additional instructions.
You probably did that in either a design doc or your poster.
You could link that here or document it in the repository.