|
8 | 8 | #include <imex/internal/PassUtils.h> |
9 | 9 |
|
10 | 10 | #include <mlir/IR/Builders.h> |
11 | | -#include <mlir/Dialect/Arithmetic/IR/Arithmetic.h> |
| 11 | +#include <mlir/Dialect/Arith/IR/Arith.h> |
12 | 12 | #include <mlir/Dialect/Shape/IR/Shape.h> |
13 | 13 | #include <mlir/Dialect/Tensor/IR/Tensor.h> |
14 | 14 | #include <mlir/Dialect/Linalg/IR/Linalg.h> |
@@ -171,15 +171,17 @@ struct DeferredArange : public Deferred |
171 | 171 | auto stop = ::imex::createInt(loc, builder, _end); |
172 | 172 | auto step = ::imex::createInt(loc, builder, _step); |
173 | 173 | auto dtype = builder.getI64Type(); // FIXME |
174 | | - auto artype = ::imex::ptensor::PTensorType::get(builder.getContext(), ::mlir::RankedTensorType::get({-1}, dtype), false, true); |
| 174 | + auto artype = ::imex::ptensor::PTensorType::get(builder.getContext(), ::mlir::RankedTensorType::get({-1}, dtype), false); |
175 | 175 | auto dmy = ::imex::createInt<1>(loc, builder, 0); |
176 | | - auto team = ::imex::createInt(loc, builder, 1); |
| 176 | + auto team = ::imex::createInt(loc, builder, reinterpret_cast<uint64_t>(getTransceiver())); |
177 | 177 | dm.addVal(this->guid(), |
178 | 178 | builder.create<::imex::ptensor::ARangeOp>(loc, artype, start, stop, step, dmy, team), |
179 | | - [this](uint64_t rank, void *allocated, void *aligned, intptr_t offset, const intptr_t * sizes, const intptr_t * strides) { |
| 179 | + [this](uint64_t rank, void *allocated, void *aligned, intptr_t offset, const intptr_t * sizes, const intptr_t * strides, |
| 180 | + uint64_t * gs_allocated, uint64_t * gs_aligned, uint64_t * lo_allocated, uint64_t * lo_aligned) { |
180 | 181 | assert(rank == 1); |
181 | 182 | assert(strides[0] == 1); |
182 | | - this->set_value(std::move(mk_tnsr(_dtype, rank, allocated, aligned, offset, sizes, strides))); |
| 183 | + this->set_value(std::move(mk_tnsr(_dtype, rank, allocated, aligned, offset, sizes, strides, |
| 184 | + gs_allocated, gs_aligned, lo_allocated, lo_aligned))); |
183 | 185 | }); |
184 | 186 | return false; |
185 | 187 | } |
|
0 commit comments