Dg replace merge#4959
Conversation
…t-private/master get all the latest commits from the master branch
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
|
@ZhiangWang033 needs clang-format and clang-tidy cleaned up. Also it needs to gracefully handle not having cuda installed. |
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
|
|
||
| namespace gpl2 { | ||
|
|
||
| using namespace std; |
There was a problem hiding this comment.
warning: do not use namespace using-directives; use using-declarations instead [google-build-using-namespace]
using namespace std;
^| : network_(nullptr), | ||
| db_(nullptr), | ||
| log_(nullptr), | ||
| pbVars_(), |
There was a problem hiding this comment.
warning: initializer for member 'pbVars_' is redundant [readability-redundant-member-init]
| pbVars_(), | |
| , |
| else { | ||
| return original; | ||
| } |
There was a problem hiding this comment.
warning: do not use 'else' after 'return' [readability-else-after-return]
| else { | |
| return original; | |
| } | |
| return original; | |
|
|
||
| #pragma once | ||
|
|
||
| #include <cuda.h> |
There was a problem hiding this comment.
warning: 'cuda.h' file not found [clang-diagnostic-error]
#include <cuda.h>
^| int64_t nesterovInstsArea() const | ||
| { | ||
| return stdInstsArea_ | ||
| + static_cast<int64_t>(round(macroInstsArea_ * targetDensity_)); |
There was a problem hiding this comment.
warning: call to 'round' promotes float to double [performance-type-promotion-in-math-fn]
src/gpl2/src/placerBase.h:57:
- #include <memory>
+ #include <cmath>
+ #include <memory>| + static_cast<int64_t>(round(macroInstsArea_ * targetDensity_)); | |
| + static_cast<int64_t>(std::round(macroInstsArea_ * targetDensity_)); |
| /////////////////////////////////////////////////////////////// | ||
| // Instance | ||
| Instance::Instance() | ||
| : inst_(nullptr), |
There was a problem hiding this comment.
warning: member initializer for 'inst_' is redundant [modernize-use-default-member-init]
| : inst_(nullptr), | |
| : , |
| // Instance | ||
| Instance::Instance() | ||
| : inst_(nullptr), | ||
| instId_(-1), |
There was a problem hiding this comment.
warning: member initializer for 'instId_' is redundant [modernize-use-default-member-init]
| instId_(-1), | |
| , |
There was a problem hiding this comment.
Why are there changes in drt? It seems unrelated. Using std::cout is not ok and would require use of the logger if these are intended.
|
Please fix up the copyright organization and year. |
|
@ZhiangWang033 any eta for your updates? |
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
…ivate/OpenROAD into dg_replace_merge
This reverts commit 7850f01.
Signed-off-by: ZhiangWang033 <zhw033@ucsd.edu>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
| // | ||
| /////////////////////////////////////////////////////////////////////////////// | ||
|
|
||
| #include "gpl2/MakeGpuReplace.h" |
There was a problem hiding this comment.
warning: 'gpl2/MakeGpuReplace.h' file not found [clang-diagnostic-error]
#include "gpl2/MakeGpuReplace.h"
^| // | ||
| /////////////////////////////////////////////////////////////////////////////// | ||
|
|
||
| #include "gpl2/GpuReplace.h" |
There was a problem hiding this comment.
warning: 'gpl2/GpuReplace.h' file not found [clang-diagnostic-error]
#include "gpl2/GpuReplace.h"
^| dDx_(0.0), | ||
| dDy_(0.0), | ||
| densityScale_(0.0), | ||
| haloWidth_(0), |
There was a problem hiding this comment.
warning: member initializer for 'haloWidth_' is redundant [modernize-use-default-member-init]
| haloWidth_(0), | |
| , |
| densityScale_(0.0), | ||
| haloWidth_(0), | ||
| type_(InstanceType::FILLER), | ||
| isFixed_(false) |
There was a problem hiding this comment.
warning: member initializer for 'isFixed_' is redundant [modernize-use-default-member-init]
| isFixed_(false) | |
| int lx = 0.0; | ||
| int ly = 0.0; | ||
| inst->getLocation(lx, ly); | ||
| int ux = lx + floor(bbox->getDX() / 2) * 2; |
There was a problem hiding this comment.
warning: result of integer division used in a floating point context; possible loss of precision [bugprone-integer-division]
int ux = lx + floor(bbox->getDX() / 2) * 2;
^| { | ||
| int x; | ||
| int y; | ||
| __host__ __device__ IntPoint() : x(0), y(0) {} |
There was a problem hiding this comment.
warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]
| __host__ __device__ IntPoint() : x(0), y(0) {} | |
| __host__ _device_ IntPoint() : x(0), y(0) {} |
| { | ||
| float x; | ||
| float y; | ||
| __host__ __device__ FloatPoint() : x(0), y(0) {} |
There was a problem hiding this comment.
warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]
| __host__ __device__ FloatPoint() : x(0), y(0) {} | |
| __host__ _device_ FloatPoint() : x(0), y(0) {} |
| { | ||
| int64_t x; | ||
| int64_t y; | ||
| __host__ __device__ Int64Point() : x(0), y(0) {} |
There was a problem hiding this comment.
warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]
| __host__ __device__ Int64Point() : x(0), y(0) {} | |
| __host__ _device_ Int64Point() : x(0), y(0) {} |
|
|
||
| struct IntRect | ||
| { | ||
| __host__ __device__ IntRect() |
There was a problem hiding this comment.
warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]
| __host__ __device__ IntRect() | |
| __host__ _device_ IntRect() |
|
|
||
| // numeric operators | ||
|
|
||
| __host__ __device__ int fastModulo(const int input, const int ceil); |
There was a problem hiding this comment.
warning: declaration uses identifier 'device', which is a reserved identifier [bugprone-reserved-identifier]
| __host__ __device__ int fastModulo(const int input, const int ceil); | |
| __host__ _device_ int fastModulo(const int input, const int ceil); |
Hi Matt,
I added the init codes of DG-RePlAce. Could you please take a look ?
Thanks,
Zhiang