SelectToken#1577
Conversation
STFleming
left a comment
There was a problem hiding this comment.
Awesome work @ollycassidy13, this looks like a great PR.
Only main issue I could see was license header consistency along with the resource estimate functions looking a bit off. I think we should probably increase the test coverage also with more parameters being changed, but let's discuss that.
| @@ -0,0 +1,272 @@ | |||
| # Copyright (C) 2026, Advanced Micro Devices, Inc. | |||
There was a problem hiding this comment.
Please use new lic header
Copyright Advanced Micro Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| @@ -0,0 +1,77 @@ | |||
| /****************************************************************************** | |||
There was a problem hiding this comment.
Please use the new lic header
Copyright Advanced Micro Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| @@ -0,0 +1,132 @@ | |||
| # Copyright (C) 2026, Advanced Micro Devices, Inc. | |||
There was a problem hiding this comment.
Please use the new lic header
Copyright Advanced Micro Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| @@ -0,0 +1,155 @@ | |||
| # Copyright (C) 2026, Advanced Micro Devices, Inc. | |||
There was a problem hiding this comment.
please use the new lic
Copyright Advanced Micro Devices, Inc.
SPDX-License-Identifier: BSD-3-Clause
| self.set_nodeattr("outputDataType", idt.name) | ||
| model.set_tensor_datatype(node.output[0], idt) | ||
|
|
||
| def verify_node(self): |
There was a problem hiding this comment.
Just use the base class implementation? Or override with some checks.
| def bram_estimation(self): | ||
| return 0 | ||
|
|
||
| def lut_estimation(self): |
There was a problem hiding this comment.
Why is this 200? This being a magic flat constant feels off :).
There was a problem hiding this comment.
I wonder if we should widen the parameter matrix here to test more parameter configurations?
Adds the SelectToken fpgadataflow layer and RTL implementation, converting supported Gather patterns into a hardware SelectToken op for selecting one token from a token sequence.